Viewing 15 posts - 46 through 60 (of 65 total)
UMG Developer (6/13/2010)
I got it wrong because I didn't read the question correctly, I thought it was asking how many rows where returned.
Damn! Same here!!!!!
June 16, 2010 at 6:55 am
Absolutely ridiculous!
What is the point of a trick question on a technical forum?
Maybe you could argue that as developers we need to pay attention to the smallest detail, but that's...
October 14, 2009 at 3:36 am
beck.patrick (9/24/2009)
So the (corrected) example code
update
a1
set
col = a2.col
from
table1 as a1,
table2 as a2
where
a1.col = a2.col
This will update table1.col to with the...
September 24, 2009 at 3:37 am
Me too... never occurred to me I could choose multiple items.
September 23, 2009 at 1:58 am
At the risk of looking foolish, what am I missing here?
Is this not a case of:
if (condition) or (condition)
then
else
That's just an if-then-else statement.
Both conditions equate to false, so...
September 16, 2009 at 3:29 am
ma (9/7/2009)
September 7, 2009 at 6:07 am
Hmmm... I played with this a little and the number of rows certainly makes a difference.
I added 10,000 rows (actually 10,001 - as below) and this time query 1 gave...
September 7, 2009 at 5:05 am
Jamie Longstreet (8/21/2009)
Excellent question.First because it demonstrates the MERGE,
Second because it illustrates the $action,
Nice one!
Actually, I was going to say much the same but got a bit...
August 21, 2009 at 3:29 pm
Wrong here too - I spent a lot of time deciding between answer 1 and 2, and as Paul mentioned above, plumped for 1 as the question asked about actions...
August 21, 2009 at 6:50 am
What an excellent and highly educational question - not often does a QotD make me rethink established strategies.
July 28, 2009 at 6:35 am
You can group by a column that is not in the select list... though it may produce a confusing result.
e.g.
BEGIN TRAN
CREATE TABLE fred
...
June 23, 2009 at 3:01 am
sashikanta.mishra (6/17/2009)
SELECT * FROM [dbo].[temp_OrderBy]
WHERE name_name in ('Reymod','Tang','Kapil','John')
You could use a CASE statement as an ORDER BY clause:
ORDER BY
CASE
WHEN name_name = 'Reymod' THEN 1
...
June 18, 2009 at 5:24 am
Akhil Kohli (6/14/2009)
The answer should be char(1) as there is no information about unicode or non-unicode characters.
Surely that very lack of information indicates the need to code defensively? NCHAR(1) is...
June 15, 2009 at 5:41 pm
pebbleonthebeach (6/8/2009)
http://msdn.microsoft.com/en-us/library/ms176089.aspx states "Use char when the sizes of the column data entries are consistent."So char(1) is the recommended answer, although nchar(1) would be safer.
...and http://msdn.microsoft.com/en-us/library/ms186939.aspx states "Use...
June 8, 2009 at 9:55 am
You can add my vote for nchar(1) - the question states one character but does not restrict that to plain old ascii. Given that information it would be highly irresponsible...
June 8, 2009 at 4:12 am
Viewing 15 posts - 46 through 60 (of 65 total)