Viewing 15 posts - 2,116 through 2,130 (of 8,416 total)
Ah right - I see it now. The SELECT 1/0 returns an empty result set. Execute Scalar only opens the first result, so your code never encounters the...
February 27, 2011 at 12:33 am
diamondgm (2/26/2011)
Yeah, I'm aware of the cost of sorting the guid, but it was lame of me not to see what you pointed out about the optimiser - thank you!
'Lame'...
February 27, 2011 at 12:07 am
diamondgm (2/26/2011)
I was trying to indicate that the order by clause seems inconsequential.
Yes but calling NEWID() is not for free, and neither is sorting by a uniqueidentifier.
Thanks for answering my...
February 26, 2011 at 11:35 pm
daveriya (2/25/2011)
But i am getting result,whats wrong in this?tell me
You may get correct results, but it would be better to use GROUP BY.
February 26, 2011 at 11:31 pm
diamondgm (2/26/2011)
However, so far I have found the following method to be the simplest and cheapest for identifying and deleting duplicates:
SELECT RANK() OVER (PARTITION BY empno ORDER BY NEWID()) RankX
You...
February 26, 2011 at 11:24 pm
diamondgm (2/26/2011)
By playing devils advocate, could it not easily be argued that RDBMS is all about arrays? Sure we don't call them arrays...
February 26, 2011 at 11:17 pm
Khades (2/25/2011)
February 26, 2011 at 11:14 pm
daveriya (2/26/2011)
what about particular day,i should add where condition.thanks
Yes, but we careful if the LoginDate column contains times as well as dates:
SELECT LoginDate,
...
February 26, 2011 at 11:11 pm
anandvish2006 (2/25/2011)
Change rows into column and vice versa without using pivot method.
If the names of the columns need to be dynamic, you can use code like this:
SET ...
February 26, 2011 at 11:06 pm
daveriya (2/26/2011)
...
February 26, 2011 at 10:37 pm
Stewart,
Can you provide a short C# script please - I'd like to see that side of the code too. Also, it would help to know which version and build...
February 26, 2011 at 10:35 pm
rocky_498 (2/26/2011)
I have question regarding Trim function,
Here is my requirement,
Address = ADDRESS1+ADDRESS2+ADDRESS3
I want to trim if there is no Address1 or Address3
I know i can use...
February 26, 2011 at 10:06 pm
daveriya (2/26/2011)
Does this involves any right ya left outer join?
Yes.
February 26, 2011 at 10:05 pm
It is possible to avoid the dummy column, ever-growing number of rows in the hidden tables, and avoid locking issues by using an approach based on this example code: (the...
February 26, 2011 at 9:40 pm
Viewing 15 posts - 2,116 through 2,130 (of 8,416 total)