pevans
Posts: 14
|
| Posted: 07/18/2006, 6:31 PM |
|
I have the following SELECT statement as an expression within the WHERE clause in query builder.
clients.ClientID NOT IN (SELECT attendance.ClientID from attendance WHERE attendance.ActivityID ='{ActivityID}')
As it stands it doesn't work. It works if I hard code in a value for '{ActivityID}'. If I try {ActivityID}, without the ticks (as in a CCS generated expression) I get a syntax error.
Can any one see a problem in the query, or do I need to try another way around this?
The intention is to remove from search results those clients already recorded as participants in ActivityID URL parameter.
PhilE
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 07/19/2006, 6:57 AM |
|
Check in Visual Query Builder if you have the ActivityID parameter set.
Debug the statement as it is being used, to see if values are substituted correctly.
As you did not state development language/Database find how to (in PhP) echo the generated statement.
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
PhilE
|
| Posted: 07/25/2006, 7:16 PM |
|
Thanks Walter. Due to more recent developments this little problem is at the bottom of my todo list but I have your suggestion in mind for when I get back to it.
|
|
|
 |
|