Get rid of the "go" before the where clause. Your insert is running as one batch w/out a 'where' clause, then you try to run a where clause by itself, and that's the error. You want:

SELECT *
INTO TempBackupsop10200.dbo.sop10200
FROM pbs.dbo.sop10200
WHERE sopnumbe = '42759'

as the select statement.

-Walden

BTW, this 2005 or 2008? If 2008 you may want to add compression to that backup and make your backup even smaller.


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.