Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL syntax issue

Author  Topic 

mtaplits
Starting Member

6 Posts

Posted - 2003-12-18 : 00:58:03
I have table USERS:
create table users(
userID int identity primary key,
firstName varchar(50),
lastName varchar(50),
Email varchar(50),
pw varchar(50),
memberSince char(8));

My query:
<cfquery datasource="formal" name="getUserID">
SELECT userID
FROM users
WHERE #session.contact_nfo.Email# = #Email#
</cfquery>

BTW: #session.contact_nfo.Email# = mtaplits@yahoo.com

I am receiving error:
[MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]The column prefix 'mtaplits@yahoo' does not match with a table name or alias name used in the query.

Even though I am seeing:
SQL SELECT u.userID FROM users u WHERE mtaplits@yahoo.com = mtaplits@yahoo.com
DATASOURCE formal
VENDORERRORCODE 107
SQLSTATE 42000


Does anyone know what's wrong?

Thanks in advance.

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-12-18 : 01:38:22
You probably need single quotes around the emails

Owais

We make a living out of what we get, but we make a life out of what we give.
Go to Top of Page

mtaplits
Starting Member

6 Posts

Posted - 2003-12-18 : 01:53:02
thank you!
Go to Top of Page
   

- Advertisement -