Viewing 15 posts - 6,571 through 6,585 (of 7,185 total)
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
John
Best just to insert the new records. Is your data date-stamped? If so, you can write your insert query based on the date. If not, you will indeed need some...
January 26, 2007 at 2:09 am
You should have an icon in Control Panel called SQL Server 2000 Licensing Setup.
John
January 25, 2007 at 9:20 am
John
Set up your AS/400 server as a linked server and then create a job to copy data to your table weekly. Or create a DTS package to do the same...
January 25, 2007 at 9:16 am
USE master
GO
SELECT DB_ID(MyDB)
John
January 24, 2007 at 7:52 am
Your queries don't make sense. They don't specify what update to perform. For example, the second query should read something like this:
update T set myCol = 40
where id = 32...
January 23, 2007 at 9:16 am
You will have to mess with dynamic SQL and fiddly datepart functions. It can be done, but if you want to keep it simple, probably best to use a database...
January 23, 2007 at 9:10 am
Viewing 15 posts - 6,571 through 6,585 (of 7,185 total)