Home > Archive > microsoft.public.sqlserver.server > October 2002 > Syntax ok, but I get syntax error...





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Syntax ok, but I get syntax error...
Paul

2002-10-31, 3:23 pm

I constructed the following SQL statement to drop a
column.

ALTER TABLE FileDownload
DROP COLUMN VMark

I tested it in my test database and it works fine (as it
should). Then I copied and pasted it in my live database
and now it tells me "Error 170: Line2: Incorrect syntax
near VMark". My test database was copied from my live
database so they are identical! I don't get it...

I'm running SQL Server 7.0, SP2 on NT 4.0, SP6a

Any ideas would be appreciated! Thanks in advance!

Narayana Vyas Kondreddi

2002-10-31, 3:23 pm

Check your database compatibility level using sp_dbcmptlevel. It won't work
if your database is in 6.5 compatibility mode.

--
HTH,
Vyas, MVP (SQL Server)
SQL Server FAQ, articles, code samples, interview questions and more @
http://vyaskn.tripod.com/




"Paul" <pm867@hotmail.com> wrote in message
news:339101c28120$6c5a9ed0$2ae
2c90a@phx.gbl...
I constructed the following SQL statement to drop a
column.

ALTER TABLE FileDownload
DROP COLUMN VMark

I tested it in my test database and it works fine (as it
should). Then I copied and pasted it in my live database
and now it tells me "Error 170: Line2: Incorrect syntax
near VMark". My test database was copied from my live
database so they are identical! I don't get it...

I'm running SQL Server 7.0, SP2 on NT 4.0, SP6a

Any ideas would be appreciated! Thanks in advance!



Paul

2002-10-31, 4:23 pm

Thank you very much! That's exactly the problem. My live
database was upgraded from 6.5 and that must be the reason
it has 6.5 compatibility. My new one was copied from the
live one after the upgrade so it has a compatibility with
7.0.


>-----Original Message-----
>Check your database compatibility level using

sp_dbcmptlevel. It won't work
>if your database is in 6.5 compatibility mode.
>
>--
>HTH,
>Vyas, MVP (SQL Server)
>SQL Server FAQ, articles, code samples, interview

questions and more @
>http://vyaskn.tripod.com/
>
>
>
>
>"Paul" <pm867@hotmail.com> wrote in message
> news:339101c28120$6c5a9ed0$2ae
2c90a@phx.gbl...
>I constructed the following SQL statement to drop a
>column.
>
>ALTER TABLE FileDownload
>DROP COLUMN VMark
>
>I tested it in my test database and it works fine (as it
>should). Then I copied and pasted it in my live database
>and now it tells me "Error 170: Line2: Incorrect syntax
>near VMark". My test database was copied from my live
>database so they are identical! I don't get it...
>
>I'm running SQL Server 7.0, SP2 on NT 4.0, SP6a
>
>Any ideas would be appreciated! Thanks in advance!
>
>
>
>.
>

Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net