Just got back from lunch. I receive a lot of help from this list and I am just glad that I could return one.
Josh -----Original Message----- From: James Taavon [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 2:07 PM To: CF-Talk Subject: RE: Access to SQL discrepancy in transfer of data (SOLVED) Thanks Joshua, that worked like a charm. -----Original Message----- From: Joshua Tipton [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 1:45 PM To: CF-Talk Subject: RE: Access to SQL discrepancy in transfer of data <cfquery name="GetKeyUser" datasource="lsar_dev"> select fullname, role from dbo.tbl_users where role = (select 'key_' + '' + role as keyrole from dbo.tbl_users where username = '#session.username#') -----Original Message----- From: James Taavon [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 1:37 PM To: CF-Talk Subject: Access to SQL discrepancy in transfer of data What a surprise, NOT!! I have a QUERY in a QUERY that works fine in MS-Access 97, but bombs in SQL SERVER 2000. Here is the query: <cfquery name="GetKeyUser" datasource="lsar_dev"> select fullname, role from dbo.tbl_users where role = (select 'key_' & role as keyrole from dbo.tbl_users where username = '#session.username#') </cfquery> The error: ODBC Error Code = 37000 (Syntax error or access violation) [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid operator for data type. Operator equals boolean AND, type equals nvarchar. SQL CHANGED MY DATA TYPES FROM TEXT IN ACCESS TO NVARCHAR IN SQL. WHAT DATATYPE SHOULD THE FIELD "ROLE" BE? ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

