jong
Posts: 1
|
Posted: 12/08/2004, 7:56 AM |
|
Having a problem with a select statement in CCS.
Can I do this in CCS?
select t.*
from table t
where (t.id = Session["id"] OR
Session["id"] = 'All')
I have no problem with the first three lines. Code Charge makes it easy to get the session variable for the right side of the equation. The problem comes when I want to use the session var for the left side of the equation.
CCS allows me to manually code an expression in the where clause, however, I haven't been able to figure out how to correctly specify the Session var on the left side of the equation in the 4th line above.
Anyone run into this problem or have any suggestions?
Thanks in advance.
|
|
|
peterr
Posts: 5971
|
Posted: 12/08/2004, 9:46 AM |
|
Hi,
Please change your syntax to:
select t.* from table t where (t.id = {id} OR {id} = 'All')
Then create a Where/SQL parameter called id and specify that the parameter source is also id, and parameter type is Session.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|