all groups > sql server (alternate) > july 2003 >
You're in the

sql server (alternate)

group:

SQL version 8.0 - Invalid column name


SQL version 8.0 - Invalid column name steven7 NO[at]SPAM xs4all.nl
7/13/2003 6:39:10 AM
sql server (alternate):
Hi,

I'am trying a very simple sql statement but it does not work.
I use the SQL version 8.0
I use the "Northwind" sample database and the Table "Employees".

The sql statement is:

SELECT * From Employees Where City = "London"

The returned message is:

Server: Msg 207, Level 16, State 3, Line 1
Invalid column name 'London'.

Can somebody tell me what could be wrong?
Greetings,
Re: SQL version 8.0 - Invalid column name John Bell
7/13/2003 3:22:54 PM
Hi

This is because of the QUOTED IDENTIFIERS setting being ON

either set them off
SET QUOTED_IDENTIFIER OFF
SELECT * From Employees Where City = "London"

or
SELECT * From Employees Where City = 'London'

For more information see Books online or
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_set-set_9jxu.asp?frame=true

John

[quoted text, click to view]

Re: SQL version 8.0 - Invalid column name Matt
7/15/2003 10:54:43 AM
Steven,

Use single quotes. The correct statement is

SELECT * FROM Employees WHERE City = 'London'

HTH

Matt

[quoted text, click to view]

AddThis Social Bookmark Button