<CFQUERY NAME="passport_attendance" dbtype="query">
SELECT passport_attendance_id
FROM passport_attendance
WHERE student_id = <cfqueryparam
value="#passport_registration.student_id[pr]#" cfsqltype="CF_SQL_INTEGER"
null="#YesNoFormat(passport_registration.student_id[pr] is '')#">
OR people_id = <cfqueryparam value="#passport_registration.people_id[pr]#"
cfsqltype="CF_SQL_INTEGER"
null="#YesNoFormat(passport_registration.people_id[pr] is '')#">
</CFQUERY>


On Fri, Jan 16, 2009 at 2:13 PM, daniel kessler <dani...@umd.edu> wrote:

> I'm doing this query in Oracle and am encountering the error:
>
> Encountered "student_id = OR. Incorrect conditional expression, Expected
> one of [like|null|between|in|comparison] condition,
>
> <CFQUERY NAME="passport_attendance" dbtype="query">
>         SELECT passport_attendance_id
>          FROM passport_attendance
>          WHERE student_id = #passport_registration.student_id[pr]#
>          OR people_id = #passport_registration.people_id[pr]#
> </CFQUERY>
>
> The problem appears to be that sometimes
> passport_registration.student_id[pr] is empty.  It's a numeric, so when I
> wrapped it in quotes, it didn't like that either cause it was comparing
> different types.
>
> How do I handle that sort of situation?  One of the two is always gonna be
> empty.
>
> daniel
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318105
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to