Viewing 15 posts - 31 through 45 (of 76 total)
It's not just one point or two extra bytes anymore!
It goes way beyond, if only I knew where it would take us...
June 17, 2009 at 6:28 am
Another one who chose NCHAR(1). The Netherlands, no score.
Amidst the 12 pages of reactions I found this:
Proud member of the Anti-RBAR alliance.
What did I miss? Where can I join?
June 15, 2009 at 2:14 am
Jeff Moden (5/6/2009)
I can only hope that gserdijn got it from me. 😛
Off course!
When you rewrite a cursor to be set based, don't make the same error in logic.
Right...
May 7, 2009 at 12:07 am
That code is quite a rat's warren, without table structure, testdata and proper formatting.
But first let us get rid of the procedure call, once and for all.
SELECT data.*, ctrl.ctrln1
FROM
...
May 5, 2009 at 11:43 am
Manie Verster (5/4/2009) Friend, you taught me something today.
Thank you for the compliment, Manie. I appreciate it a lot.
😎
May 4, 2009 at 12:49 pm
Manie Verster (4/30/2009) Here is a cursor that I would like you to convert to set for me please. If you can do this I will accept the fact that...
May 1, 2009 at 12:40 am
min.li (4/29/2009)
If you test it with my new edited populate test data script, you will see that this solution is not correct. The join have to be based on the...
April 29, 2009 at 6:25 am
Regarding the duplicate DataIDs: Well, then we can use a UNION.
SELECT TestData.RowNumber, TestData.DataID, FactRL.DataTime,TestData.Name NameFrom, FactRL.DataText
FROM TestData
JOIN FactRL ON TestData.DataID = FactRL.DataID
UNION
SELECT TestData.RowNumber, TestData.DataID, NULL ,TestData.Name NameFrom,...
April 29, 2009 at 4:07 am
And, off course, the populating of the tables can be done without a LOOP.
SET ROWCOUNT 10000;
SELECT IDENTITY(INT,101,1) AS id INTO #Tally FROM sysobjects a, sysobjects b;
SET ROWCOUNT 0;
INSERT INTO...
April 29, 2009 at 3:43 am
This query leads to an identical resultset, but I have no idea what you are trying to accomplish.
SELECT TestData.RowNumber, TestData.DataID, FactRL.DataTime,TestData.Name NameFrom, COALESCE(FactRL.datatext,factsl.datatext) DataText
FROM TestData
LEFT JOIN FactRL ON TestData.DataID...
April 29, 2009 at 3:40 am
It's just a way to populate a table/temp table/etc... with some values.
April 28, 2009 at 2:37 pm
This was what I intended for the problem on page 8 which happens to look much the same as Samuel Vella's solution.
SET ROWCOUNT 5000;
SELECT IDENTITY(INT,0,1) AS id INTO #Tally FROM...
April 28, 2009 at 2:32 pm
Well done! Can you tell us the publishing date of Part 3?
The results of the comparison: no spoilers here 😎
Original code:
CpuMs: 8750
LogRds: 834261
Elapsed: 9898
Rewrite:
CpuMs: 94
LogRds: 236
Elapsed: 89
April 27, 2009 at 12:45 am
DECLARE @Txt VARCHAR(MAX)
SELECT @Txt = ''
SELECT @Txt = @Txt + ao.name + ao.type_desc + CHAR(13) + CHAR(10)
FROM SYS.all_objects ao WHERE ao.type IN ('U' , 'V') ORDER...
April 23, 2009 at 12:21 am
select square(count(1)) From master.sys.columns C1
April 14, 2009 at 7:55 am
Viewing 15 posts - 31 through 45 (of 76 total)