April 8, 2008 at 5:14 am
The poster's explanation is an opinion which Shaun happens to agree with.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
April 8, 2008 at 6:49 am
Wow! Are the number of QOTD replies getter longer or what :w00t:
There seem to be a lot of strong personalities here :crazy:
Glad I'm not a DBA....
always right, never wrong and what I say goes....
LOL only joking π
Must admit I get slightly miffed if the answer is clearly wrong, but hey, I still learn things. All I have to do is remember compatibility when moving to 2005.
And remember folks..... no one likes a smart a$$ :hehe:
Far away is close at hand in the images of elsewhere.
Anon.
April 8, 2008 at 11:31 pm
works fine in 2000..question not correct..
April 9, 2008 at 1:13 am
Arun V (4/8/2008)
works fine in 2000..question not correct..
Just couldn't let it lie..... π
--Shaun
Hiding under a desk from SSIS Implemenation Work :crazy:
April 9, 2008 at 2:12 am
Sub QOTD_Threadpost
for n = 1 to Ubound(PeoplesPatience)
print "But it works in my environment!"
print "Have you checked the DB compatibility mode?"
if instr(weekdayname(weekday(Now)), "y") then
Shaunpost()
end if
threadstring$ = threadstring$ + bloodnockjoke(Rnd)
loop
end sub
Semper in excretia, suus solum profundum variat
April 9, 2008 at 2:14 am
majorbloodnock (4/9/2008)
Sub QOTD_Threadpostfor n = 1 to Ubound(PeoplesPatience)
print "But it works in my environment!"
print "Have you checked the DB compatibility mode?"
if instr(weekdayname(weekday(Now)), "y") then
Shaunpost()
end if
threadstring$ = threadstring$ + bloodnockjoke(Rnd)
loop
end sub
rofl - dude I concede π
Hiding under a desk from SSIS Implemenation Work :crazy:
April 9, 2008 at 2:17 am
Glad you took it that way, Shaun. When I reread my post, I realised I'd forgotten the smiley. Please take it as read that it was meant to be there.
Semper in excretia, suus solum profundum variat
April 9, 2008 at 3:02 am
majorbloodnock (4/9/2008)
Glad you took it that way, Shaun. When I reread my post, I realised I'd forgotten the smiley. Please take it as read that it was meant to be there.
Well I was gonna take you outside and knock major blood out of you but thought hang on 's a joke π
No I really did laugh out loud. π
--Shaun
Hiding under a desk from SSIS Implemenation Work :crazy:
April 9, 2008 at 7:46 am
works fine in SQL Server 2000
nothing indicates it's for 2005, so I should get a point. It's the first answer.
this is now the second one in a row that this has happened to, where the answer was not valid.
What's going on SSC?
April 9, 2008 at 8:41 am
I have tried it, and it works in SQLServer2000
April 9, 2008 at 1:16 pm
Yeah. SQL 2000 allows this but will duplicate the start_date column. It will appear as the first column, then also in its original column order.
Had this query also contained a JOIN, then you likely would get an ambiguous column name. That said, it's almost always a good idea to alias or explicitly reference columns anyway. Avoids problems down the line. π
Kindest Regards,Rick Farris
April 11, 2008 at 7:12 am
Thanks for the reply.
Doesn't it supported by SQLServer 2005? I don't have SQLServer 2005, so couldn't test it.
Also somebody need to describe the question completely like environment etc. Otherwise, nobody will rely on the answers provided in the such a reliable website.
Regards,
Daljeet
April 11, 2008 at 11:48 am
sorry your answer is not correct because both are same table so there is no problem to call the column any where in the select statement please try again the same query in your database. I already try your query i didn't get any error, so first option 1 is correct
April 11, 2008 at 2:42 pm
If you use sql server 2000, the query works fine but no correct answer choise is posted. This is because the start_date column will appear twice; i.e. as the first column and in its right place in the table.
April 11, 2008 at 4:45 pm
Ashenafi Zeleke (4/11/2008)
... but no correct answer choise is posted. This is because the start_date column will appear twice; ...
Now, the first answer states
All columns and all rows from the employee table in descending start_date order, with the start_date as the first column
Which part of that answer does having a column appear twice contradict? Having any column appear just once is neither a necessary nor sufficient condition to comply with that answer. As I go through each condition of the answer, I can honestly say 'yes'. The fact that start_date appears in the first and another column does not contradict any part of the answer.
"Is that your car?" "No, it's one of my cars"
Viewing 15 posts - 121 through 135 (of 182 total)
You must be logged in to reply to this topic. Login to reply