Re: SOT Oracle query OR problem
>SELECT passport_attendance_id >FROM passport_attendance >WHERE > >people_id = cfsqltype="CF_SQL_INTEGER"> > >student_id = cfsqltype="CF_SQL_INTEGER"> > > > >Last one did not work because syntax should be "IS NULL" not "= NULL" That one worked fine and is very straight-forward. Makes total sense. thank you very much and have a good weekend. 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:318117 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SOT Oracle query OR problem
Oops. Try this: SELECT passport_attendance_id FROM passport_attendance WHERE people_id = student_id = Last one did not work because syntax should be "IS NULL" not "= NULL" On Fri, Jan 16, 2009 at 4:14 PM, daniel kessler wrote: > > > >SELECT passport_attendance_id > >FROM passport_attendance > >WHERE student_id = >value="#passport_registration.student_id[pr]#" cfsqltype="CF_SQL_INTEGER" > >null="#YesNoFormat(passport_registration.student_id[pr] is '')#"> > >OR people_id = >cfsqltype="CF_SQL_INTEGER" > >null="#YesNoFormat(passport_registration.people_id[pr] is '')#"> > > > > That's interesting. I believe that I understand it fine. However, I am > still getting an error. Here's the whole error: > > Query Of Queries syntax error. > Encountered "student_id = NULL. Incorrect conditional expression, Expected > one of [like|null|between|in|comparison] condition, > > The error occurred in /afs/. > glue.umd.edu/department/oit/eis/webhosting/sph/htdocs/home/passport/attendance/attendance2.cfm: > line 129 > 127 : student_id = value="#passport_registration.student_id[pr]#" cfsqltype="CF_SQL_INTEGER" > null="#YesNoFormat(passport_registration.student_id[pr] is '')#"> > 128 : OR > 129 : people_id = value="#passport_registration.people_id[pr]#"cfsqltype="CF_SQL_INTEGER"null="#YesNoFormat(passport_registration.people_id[pr] > is '')#"> > 130 : > > > ~| 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:318113 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SOT Oracle query OR problem
> >SELECT passport_attendance_id >FROM passport_attendance >WHERE student_id = value="#passport_registration.student_id[pr]#" cfsqltype="CF_SQL_INTEGER" >null="#YesNoFormat(passport_registration.student_id[pr] is '')#"> >OR people_id = cfsqltype="CF_SQL_INTEGER" >null="#YesNoFormat(passport_registration.people_id[pr] is '')#"> > That's interesting. I believe that I understand it fine. However, I am still getting an error. Here's the whole error: Query Of Queries syntax error. Encountered "student_id = NULL. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition, The error occurred in /afs/.glue.umd.edu/department/oit/eis/webhosting/sph/htdocs/home/passport/attendance/attendance2.cfm: line 129 127 : student_id = 128 : OR 129 : people_id = 130 : ~| 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:318111 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SOT Oracle query OR problem
SELECT passport_attendance_id FROM passport_attendance WHERE student_id = OR people_id = On Fri, Jan 16, 2009 at 2:13 PM, daniel kessler 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, > > > SELECT passport_attendance_id > FROM passport_attendance > WHERE student_id = #passport_registration.student_id[pr]# > OR people_id = #passport_registration.people_id[pr]# > > > 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
SOT Oracle query OR problem
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, SELECT passport_attendance_id FROM passport_attendance WHERE student_id = #passport_registration.student_id[pr]# OR people_id = #passport_registration.people_id[pr]# 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:318103 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4