CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge -> Programming

 Selecting All

Print topic Send  topic

Author Message
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.
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.