Viewing 15 posts - 4,321 through 4,335 (of 5,394 total)
No, unfortunately order is not guaranteed when assigning to variables.
I couldn't believe it when I first heard of it, but I can confirm it is so.
May 5, 2010 at 10:12 am
Your technique for retrieving the first non-zero value in variables is quite smart, but please be advised that the order is NOT guaranteed. It may work today, could go totally...
May 5, 2010 at 8:13 am
Roy Ernest (5/5/2010)
Yes yes Yes...!!!My article is out on SQL Server Standard in SQLPass site. I have been waiting for this day. Happy day for me. 🙂 😀
Congrats, Roy!
May 5, 2010 at 8:02 am
Today I ran across the strangest threads I've ever seen here on SSC:
They don't seem to be automatic spam, but, evidently,...
May 5, 2010 at 1:12 am
I would be glad to help, but I need some more information.
Take a look at the article linked in my signature, you'll find out how to ask for help...
May 5, 2010 at 1:02 am
Basically, you just have to move the indexes.
Take a look at this article by Martin Bell, I think you will find enlightening.
Hope this helps
Gianluca
May 5, 2010 at 1:00 am
Nice code, Mr. Coffee!
Looks like you specialized in pivot/unpivot lately...
May 4, 2010 at 2:25 pm
That's ok, I think I got it:
UPDATE @test-2
SET Field1 = (SELECT TOP 1 Field1 FROM @Test2 WHERE T1Id = T1.Id AND Field1 != 0 ORDER BY Id),
Field2 = (SELECT...
May 4, 2010 at 10:47 am
Bhuvnesh (5/4/2010)
/************************************************************************
*
* Author: Rafal Skotak
* Purpose: Procedure displays amount of disk space used by databases per directories
* Date: 2008-01-14
*
************************************************************************/
....
It doesn't look this code does what the OP wants.
Are you...
May 4, 2010 at 8:35 am
This should do the trick for you:
UPDATE @test-2
SET t1.Field1 = (CASE WHEN t1.Field1 = 0 THEN t2.Field1 ELSE t1.Field1 END),
t1.Field2 = (CASE...
May 4, 2010 at 8:33 am
I think I almost understood what you mean, but it would be clearer with some more information:
1) Table scripts
2) Sample data
3) Expected output
4) What you tried so far
See the article...
May 4, 2010 at 7:55 am
Do database and schema name match?
Try selecting the procedure from object explorer and from context menu choose "Script procedure as" --> "Execute to" -->"New Query editor window"
May 4, 2010 at 6:51 am
Bhuvnesh (5/4/2010)
Gianluca Sartori (5/4/2010)
PARTITION BY is used in windowed aggregates.can you give any example ?
Dave put a neat example in his post, last query.
May 4, 2010 at 6:47 am
Some links for you:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=99653
http://weblogs.sqlteam.com/tarad/archive/2007/12/18/60435.aspx
May 4, 2010 at 6:28 am
Viewing 15 posts - 4,321 through 4,335 (of 5,394 total)