Viewing 15 posts - 106 through 120 (of 172 total)
It is a data warehouse so I would guess there is already a 'structure' in place for foreign keys.
If not...
It will take multiple steps whether you use NewID() or identity....
June 11, 2007 at 1:20 pm
Thanks for the great link Rick.
I had finally tracked the problem down (using trace) that the application sql was running an execution plan (@84) and the SSMS was using an...
June 11, 2007 at 10:50 am
Best guess is you do not have your development box configured to handle remote connections.
GO into your configuration tools and check the allow remote access.
June 8, 2007 at 4:11 pm
The ROLLUP below will work, however it breaks when additional columns (status.id) are added for ordering. Totalling should probably be a part of reporting not data retrival.
create table #requests...
May 30, 2007 at 4:36 pm
Not sure on performance but you avoid the case statement below...
select blah, blah
from Alphabets
WHERE (yourCOlumn = 'A' AND Letter IN ('A','E','I','O','U') )
OR (yourColumn 'A' and letter in...
May 30, 2007 at 4:11 pm
CREATE TABLE #tmp(id int IDENTITY, other VARCHAR(100))
INSERT INTO #tmp(other) VALUES ('1st value')
DBCC checkident('#tmp', RESEED, 5)
INSERT INTO #tmp(other) VALUES ('2nd value')
DECLARE @aSeed INT
SET @aSeed = 25
DBCC checkident('#tmp', RESEED,...
May 2, 2007 at 2:33 pm
WOW! So glad to read that post!
ROW_NUMBER() is going eliminate so many derived tables for getting a max/min value and then joining to the original query.
Example SQL Below
UPDATE #assembly
SET #assembly.assemblyStatusID...
March 30, 2007 at 11:09 am
The data needs to be in a format SQLServer denotes as datetime.
'200609151540' is not a datetime it is a string
'20060915 15:40' is recognizable as a datetime string, with rules to...
March 26, 2007 at 3:15 pm
The actual sproc was quite a bit more involved but I used the same type of logic below, specifically the case logic. I did not notice a performance hit.
I...
March 14, 2007 at 5:43 pm
a Move data you are keeping into a temp table
truncate original
restore temp into original table
b break the data down into a reasonable count...
March 13, 2007 at 4:07 pm
Either the sp_helptext or sp_depends will do grand!
I will be creating a temp (or variable table) and checking the results to determine which way to switch the data and load...
March 5, 2007 at 9:23 pm
If you know your columns before runtime you can create the temp table and then populate it with your target data.
create table #tmpWorkShop (name varchar(100), id int)
INSERT INTO #tmpWorkShop
EXEC...
March 1, 2007 at 4:24 pm
When using an Access myDatabaseFrontEnd.adp form you may need to create a primay key on the SqlServer Table.
March 1, 2007 at 2:49 pm
I have ran into similar performance gaps between a TSQL statement and a sproc.
Run both queries in SSMS with actual execution plan. You should spot where the...
March 1, 2007 at 12:37 pm
For these migration type of needs it usually works good to have a multiple level attack.
Create a tmp table with an identifying column (or two) the sourcefield Quad and the...
March 1, 2007 at 12:27 pm
Viewing 15 posts - 106 through 120 (of 172 total)