Hello everyone,
I am new to SQL Server 2008 Full Text index function. I am learning from this tutorial, http://www.codeproject.com/KB/database/SQLServer2K8FullTextSearh.aspx. I am using SQL Server 2008 Enterprise.
In the first step of the tutorial, it is mentioned that I need to "Create a Full-Text Catalog", but I did not find the New ...
Hello everyone,
I heard SQL Server 2008 uses less disk space for the same amount of stuff (i.e. more compact format, and more disk space efficient, I mean storing MDF/LDF file) compared to previous version, like SQL Server 2000. Any document to prove that or describe that feature? I just need a high level learning, do not need too much ...
Hello all-knowing co-stackers.
Our masters thesis project is creating a database schema analyzer. As a foundation to this, we are working on quantifying bad database design.
Our supervisor has tasked us with analyzing a real world schema, of our choosing, such that we can identify some/several design issues. These issues are to be used...
i have been asked to write a query which in should rank customers base on the quantity of orders they have. the main important factor is that if two customers have been ordered the same quantity they should have be in same rank. i want to know the way to handle this query. for this i have began as below:
select tble1.customerid, RANK()...
i want to define a scaller fucntion which in that im giong to return the result into a variable but i do not know how to do this.
CREATE FUNCTION dbo.Funname ( @param int )
RETURNS INT
AS
declare @returnvar int
select @returnvar = select colname from tablename where someconditions = something
return(@returnvar)
i want to make a funct...
I've been reading around and found that using LIKE causes a big slowdown in queries.
A workmate recommended we use
Select Name
From mytable
a.Name IN (SELECT Name
FROM mytable
WHERE Name LIKE '%' + ISNULL(@Name, N'') + '%'
GROUP BY Name)
in lieu of
Select Name
From mytable
a.Name LIKE '%' + ISNULL(...
When I want to debug this code it gives error on objConnection.Open():
sqlExeption was Unhandled and say(A
network-related or instance-specific
error occurred while establishing a
connection to SQL Server. The server
was not found or was not accessible.
Verify that the instance name is
correct and that SQL Server is
con...
In one of my queries there's an insert of data into a temp table. Looking at the query plan, it shows the the actual insert into temp table took 54% (just inserting data into temp table). However, no rows are being inserted into the temp table.
Why does the plan show a non zero value when no rows are being inserted?
...
Hi there,
I have a table of chalets where a chalet is referenced by an account...
CHALET
------
int ChaletId PK
int Berth
ACCOUNT
-------
int AccountId PK
int ChaletId FK
The chalets start off un-referenced. When a user buys a chalet the code needs to find an unreferenced chalet and assign it to a newly created account. I think that...
I am developing a system to process recurring billing for members. Items to be purchased can be grouped together for a special package rate, or purchased individually for a higher, stand-alone rate. The portion of my database schema that determines the amount to be paid for recurring items consists of the following 4 tables:
MEMBER_RECU...
I love the way SO retains the edits to Q/A's and allows us to roll back if need be.
I'm looking for a DB structure concept on how to implement something similar to this. Can anyone give any insights?
My current solution is to have two tables like so...
Table1
ID | Date | UserID
.
Table2
ID | Table1ID | UserID |...
I have this SQL query:
SELECT DISTINCT
[BatchCode]
,SUM([Quantity]) as 'Created'
,[TotalQuantity]
,[Status]
,[Destination]
,[DateCreated]
,[CreatedBy]
FROM [FGIS].[dbo].[DropshipPackinglist]
GROUP BY BatchCode, TotalQuantity, Status, Destination, CreatedBy, ModifiedBy...
Hi all
I use Entity Framework to access my SQL data. I have some constraints in the database schema and I wonder how to handle exceptions that are caused by these constraints.
As example, I get the following exception in a case where two users try to add an (almost) identical entity to the DB concurrently.
System.Data.UpdateException
...
this is the desired result in need to populate as a report. where xx is no of people.
i have a table which has fields like :
----------
table1
----------
id
state
year(as Quarter)
gender
so i need to determine the count from id and populate as a report. the year is like 20081,20082..20084(in quarter).
i have created a dataset usin...
On SQL Server 2008, how can I place my stored procedures in "Stored Procedures" folder of my DB?
When I declare it this way:
CREATE PROCEDURE mySchema.myProc
It goes to:
MYSERVER\System Databases\Master\Programmability\Stored procedures folder.
How to tell server, to store it in:
MYSERVER\System Databases\MYDB\Programmability\Sto...
Hi Experts,
I have a Sql table
CREATE TABLE [UserTable]
(
[ID] [int] NULL,
[Name] [nvarchar](50) NULL,
[City] [nvarchar](50) NULL
) ON [PRIMARY]
In this table column ID have the Datatype Int, I want to alter the data type of the ID column to Ntext,
For that I am using the following Sql Query:
ALTER TABLE UserTable
ALTER...
I have a typed dataset userProfile which is same as a user table in my data base.
I am using a stored procedure which changes a password and return a single row of the same user.But when i am using this procedure in .cs code an sql exception telling
[There is no row at position 0.]
in public UserRow this[int index] {
Line 413: ...
Hi,
I have an SQL server 2008 database instance on one machine. Now I want to copy this database to another machine. I use the script wizard inside SQL Management Studio to generate a SQl-script with the schema and data. The script-file is rather big (around 17 GB).
Then I run the sql-script on the target machine it results in a :
Ms...
When I execute a certain stored procedure (which selects from a non-indexed view) with a non-null parameter, it's lightning fast at about 10ms. When I execute it with a NULL parameter (resulting in a FKColumn = NULL query) it's much slower at about 1200ms.
I've executed it with the actual execution plan and it appears the most costly...
I'm using SQL Server 2008.
I've got a column NVARCHAR(MAX) in a table which I want to make sure is unique.
The table has 600,000 records and grows every day by 50,000 records.
Currently before adding an item to the table I check if it exists in the table and if not I insert it.
IF NOT EXISTS (SELECT * FROM Softs Where Title = 'exampl...