Viewing 15 posts - 106 through 120 (of 322 total)
The 2nd SELECT has no ORDER BY clause, and the table variable has no index. How do you know what the last row will contain?
😛
November 25, 2009 at 1:35 pm
Thanks Gail,
Well written. I read all 3 and learned a few things.
November 18, 2009 at 6:53 am
Steve Jones - Editor (11/17/2009)
The question...
November 17, 2009 at 4:33 pm
CirquedeSQLeil (11/17/2009)
"Will all these statements when executed as a batch return an equivalent date, hour, minute and second assuming they all complete within the same second?"
Ah, but you got the...
November 17, 2009 at 1:25 pm
Lynn Pettis (11/17/2009)
November 17, 2009 at 1:02 pm
Yes. I think that typical system clock resolution is 0.060 seconds. In spite of CPU speed, the clock doesn't register every millisecond.
cengland0 (11/17/2009)
I clicked 'Quote' a couple of times and...
November 17, 2009 at 12:47 pm
You TallyHo you.
It doesn't really apply to the QoD. I only followed that path because I was curious, and now I know. Will it ever come in handy to know...
November 17, 2009 at 12:41 pm
Lynn Pettis (11/17/2009)
This:(something funky here at work, I had to remove the DECLARE and PRINT statements to get this post to post)
I agree. I clicked 'Quote' a couple of times...
November 17, 2009 at 12:11 pm
Lynn Pettis (11/17/2009)
1) Multiple calls to getdate() in the same query will return the same value.
2) Multiple calls to...
November 17, 2009 at 11:58 am
As it happens, SQL Server does not recognize GetDate() and GetUtcDate() as being equal.
Take a look at this:
IF GETDATE() = GETUTCDATE()
SELECT 'TRUE'
ELSE
...
November 17, 2009 at 11:51 am
Well technically its NOT TRUE, since the real answer is SOMETIMES. That isn't an option, so FALSE would be the logical choice.
This question is kind confusing because of the wording,...
November 17, 2009 at 11:14 am
bornsql (11/16/2009)
Hi how about this code whether this will work fine or notDECLARE @tmpstr2 Varchar(MAX)
SELECT @tmpstr2=replace(OriginalString, char(10) + char(13), '') FROM @demo
SELECT @tmpstr2=replace(@tmpstr2,' ','|')
SELECT @tmpstr2=replace(@tmpstr2,'|','')
SELECT @tmpstr2
In the end this..
The goal...
November 17, 2009 at 6:30 am
How very elegant, and cool. It's so well explained that I know I'll remember it the next time I have to do some cleanup.
Thanks Jeff!
November 16, 2009 at 6:41 am
Regarding my temp table without ORDER BY observation:
It was just that. An obversation.
I didn't say that I don't use ORDER BY.
I didn't recommend not using ORDER BY.
I was hoping...
November 16, 2009 at 6:08 am
Jeff,
Terrific article. I haven't used Quirky Update for a few years, and that's a good thing because I didn't know all of the rules.
I don't want to stir up a...
November 13, 2009 at 11:17 am
Viewing 15 posts - 106 through 120 (of 322 total)