August 3, 2002 at 11:13 am
Hello everyone,
Why do such problems occur on Saturdays? I recovered a SQL 7 database to SQL 2000 database. Now when I try to import a flat file or a table (in another database) I get the following error:
Error at Destination for Row number 1. Errors encountered so far in this task: 1. Line 1: Incorrect syntax near 'COLLATE'.
I have checked the collation and it is the same in both databases. Any ideas? Thanks in advance.
August 3, 2002 at 11:40 am
What compatibility mode is your db in? SQL2K will script items with the column collation included, thats not valid against a SQL7 installation or a db in 70 mode.
Andy
August 3, 2002 at 12:39 pm
Andy,
How can I check the compatibility mode? Also, what can I do to fix this problem?
August 3, 2002 at 1:50 pm
Running sp_dbcmptlevel dbname will display the level, just add the new level like this: sp_dbcmptlevel pubs dbname, 80
Andy
August 3, 2002 at 2:01 pm
I ran it and here is the result:
The current compatibility level is 80.
I have also tried loading a test file with one column/three rows. I still get the same error. I tried it with one column/one row, it succeeded, but when I queried the table, there was no data in it. I am not sure what is going on, this is all new to me. Thanks for your help!
August 3, 2002 at 5:04 pm
What are you using to do the import? Perhaps the problem is there and not with the table? The reason I say this is because it says there is an "incorrect syntax" error at line 1... which would indicate that the command being called to load the data is bad moreso than the destination.
One thing that bothers me is you said you did execute the insert command but saw no data. Just to be safe, you may want to run a DBCC CHECKDB() to verify the integrity of the database.
K. Brian Kelley
http://www.sqlservercentral.com/columnists/bkelley/
K. Brian Kelley
@kbriankelley
August 5, 2002 at 9:12 am
I am using DTS to load the table. Also, I know why the insert of 1 row did not work, I didn't hit enter (DR & LF) at the end of the line.
I hope that you guys can help me with this...the company is supposed to generate a report this morning for a client. :o(
August 5, 2002 at 9:29 am
I found the problem on microsoft.com. I ran the EXEC command at the bottom of this page:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q288411&
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply