Viewing 15 posts - 6,571 through 6,585 (of 7,191 total)
JB
You'll know the reserved words because they appear pink or blue in Query Analyzer.
John
February 2, 2007 at 2:40 am
With your sample data, ordering by max or by min will give the same result. However, if your data looked like this, you would get a different results and then...
February 2, 2007 at 2:06 am
Brian
Yes - go as if you're installing SQL Server, but choose Client Tools instead when you're given the choice.
John
February 1, 2007 at 9:35 am
Will this work?
select sectionname, count(sectionname)
from sectionnames
group by sectionname
order by max(cont_section_id)
John
February 1, 2007 at 9:29 am
Adnan
If it's working for you, then go with it. I tried rewriting using ANSI join syntax, and I got a bit bogged down... I'm sure someone else will be able...
January 31, 2007 at 4:28 am
Adnan
Is this a homework question? Show us what you've come up with so far, and we'll try to point you in the right direction?
John
January 31, 2007 at 3:05 am
Richard
You're right - TOP 1. And, on seeing it again, I don't think you need the parentheses round TOP 1 ... cTime.
I don't understand what you mean about the top...
January 30, 2007 at 8:47 am
Then how about this?
declare @trackingCode char(4)
select @trackingcode = (top1 trackingCode
FROM tblSerial ( READPAST, ROWLOCK) ORDER BY cTime)
January 30, 2007 at 8:07 am
This won't work for system databases or if your database is published for replication.
For replicated databases the easiest workaround is to back it up and restore to the new location...
January 30, 2007 at 7:44 am
Debbie
I'm assuming that the combination of UPN, FROM_DATE and TO_DATE is unique.. if not then you'll have to add extra logic.
This is untested, since you didn't provide any DDL or...
January 30, 2007 at 7:32 am
Jay
From preliminary inspection, it seems to be failing because you've commented out the INNER JOIN clauses but not the predicates (the ON parts).
You should alias your tables - this would...
January 26, 2007 at 4:10 am
Ankit
No need to post the same question more than once, please. Answered here:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=120&messageid=340005
John
January 26, 2007 at 3:58 am
I didn't get this one right, but it made me laugh!
John
January 26, 2007 at 2:56 am
Viewing 15 posts - 6,571 through 6,585 (of 7,191 total)