Okay, this revised query works. I have actually used web_profile.at_users in 
conjunction with my main table in the past, and those queries work fine. In 
this particular instance, I forgot to delete the actual column name after 
the table in my FROM clause (thanks, Stas!). I think that I will just split 
up my queries by writing a separate query to the web_profile.at_users table 
(populated from our NT network) and joining it to the data query to get the 
corresponding user names for the userid's.  Thanks, everyone!

<cfquery name="data" datasource="dsn" dbtype="ODBC">
SELECT suggestion_id,
                suggestion_name,
                submit_date,
                status_code,
                eval_disposition,
                primary_suggestor_userid,
                eval_disposition_date,
                actual_evaluator_userid

FROM    sug_suggestions
WHERE suggestion_id=suggestion_id

<cfif form.suggestion_name is not "">
AND sug_suggestions.suggestion_name LIKE '#form.suggestion_name#%'
</cfif>
ORDER BY suggestion_name

</cfquery>


----Original Message Follows----
From: "Stas Newdel" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: RE: Okay, this query should be simple...
Date: Thu, 31 Aug 2000 09:32:25 -0400

You have this in your FROM clause - web_profile.AT_users.userid

It probably shouldn't - unless it's a table name, and then it shouldn't be
in SELECT or WHERE.

-----Original Message-----
From: Terri Stocke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 31, 2000 9:03 AM
To: [EMAIL PROTECTED]
Subject: Okay, this query should be simple...


Hey All,

Maybe some fresh eyes can detect where I've messed up here.

I'm building a search screen for users to search across multiple criteria.
No matter what I do, I keep getting an Oracle error that the SQL command is
not peroperly ended. Do I need to use a different wildcard?

<cfquery name="data" datasource="dsn">
SELECT sug_suggestions.suggestion_id,
                sug_suggestions.suggestion_name,
                sug_suggestions.submit_date,
                sug_suggestions.status_code,
                sug_suggestions.eval_disposition,
                sug_suggestions.primary_suggestor_userid,
                sug_suggestions.eval_disposition_date,
                sug_suggestions.actual_evaluator_userid,
                sug_more_suggestors.suggestion_id,
                sug_more_suggestors.suggestor_userid,
                sug_evaluators.evaluator_id,
                sug_evaluators.evaluator_userid,
                web_profile.AT_users.userid,
                sug_status_codes.status_code,
                sug_status_codes.status_name
FROM    sug_suggestions, sug_more_suggestors, web_profile.AT_users.userid,
sug_status_codes
WHERE sug_suggestions.suggestion_id=sug_suggestions.suggestion_id AND
sug_suggestions.status_code=sug_status_codes.status_code AND
sug_suggestions.actual_evaluator_userid=sug_evaluators.evaluator_userid AND
sug_evaluators.evaluator_userid=web_profile.at_users.userid AND
sug_suggestions.suggestion_id=sug_more_suggestors.suggestion_id AND
sug_more_suggestors.userid=web_profile.at_users.userid AND
sug_suggestions.primary_suggestor_userid=web_profile.at_users.userid

<cfif form.suggestion_name is not "">
AND suggestion_name LIKE '#form.suggestion_name#%'
</cfif>
<other conditional statements for the other form fields...>
ORDER BY suggestion_name

</cfquery>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
the body.

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to