473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

SQL version 8.0 - Invalid column name

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,
Steven de Vries
Jul 20 '05 #1
3 56566
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/de...asp?frame=true

John

"Steven de Vries" <st*****@xs4all.nl> wrote in message
news:e6*************************@posting.google.co m...
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,
Steven de Vries

Jul 20 '05 #2
Thank you very much.

Gert-Jan Strik <so***@toomuchspamalready.nl> wrote in message news:<3F***************@toomuchspamalready.nl>...
In SQL, the string delimiter is a single quote, for example

SELECT * From Employees Where City = 'London'

The double quotes are reserved for object names with special characters.
You should not use them as string delimiter. For example

SELECT OrderID AS "Order ID" FROM "Order Details"

(In SQL-Server you will often see the proprietary syntax with brackets
to name objects.)

Gert-Jan
Steven de Vries wrote:

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,
Steven de Vries

Jul 20 '05 #3
Steven,

Use single quotes. The correct statement is

SELECT * FROM Employees WHERE City = 'London'

HTH

Matt

"Steven de Vries" <st*****@xs4all.nl> wrote in message
news:e6*************************@posting.google.co m...
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,
Steven de Vries

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Shino | last post by:
Hi, Can anyone help with this error: "ORA-00904: invalid column name"? Thanks! SQL> create view PPFa as 2 SELECT L.UserID AS LecID, U.Name, U.Email, I.IntakeID, S.UserID AS StudID 3 FROM...
1
by: wiredog | last post by:
When I try to add the line . . . CPM * MOU AS COST, after all the CASE lines I get the response in SQL Query Analyser, Server: Msg 207, Level 16, State 3, Line 1 Invalid column name 'CPM'....
3
by: graphicsxp | last post by:
Hi, I have a SQL stored procedure which looks like that: SELECT @QuerySQL = 'SELECT as LookupField, G.GroupDesc + ' + '" : "' + ' + as DescField FROM ' + 'JOIN ItemGrouping IG on IG.CatID...
1
by: sarah21 | last post by:
Hi, I am having trouble creating the data files. I received the error that there is an invalid column name 'Name' when using the BCP to create the files. How can I find out where this error is...
3
by: josna | last post by:
I am trying to execute following query but i am getting a sql exception i do not understand where i went wrong. it is saying invalid column name but i have given all fields and table names...
5
by: Anne | last post by:
Hello! Here is the statement in question: --STATEMENT A SELECT * FROM dbo.myTable WHERE colX in (SELECT colX FROM dbo.sourceTable) The problem with Statement A is that 'colX' does not exist...
3
by: kayclink | last post by:
hi, i am trying to generate a report through a record in a combo box but i get this error "invalid column name "DFG55FS" Please note "DFG55FS" is a record name in my combobox. please help i am...
1
by: lakshmisudha | last post by:
"Invalid column name 'ExecStopDT'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
1
by: Luis Mata | last post by:
I have a database. Im trying to change a column from MovieID to ArtistID. When i do that it gives me an error(Invalid column name 'MovieID'.) any suggestions to what can possibly be wrong?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.