Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Database Variable in <cfif>

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-07-08 : 07:24:59
Catherine writes "I would like to limit the SELECT COUNT(*) to only those that meet the criteria of a variable in a database.
For example if I have a datasource = "DB" and there is a variable in it called ID, I would like to do something like this:
if ID is not equal to 1,
then SELECT COUNT(*).

I tried it but it is giving me an error that it cannot find the variable, and the name and all that are correct. Is there a way to do this? (I would appreciate it if the answer is specific to ColdFusion language.) Thank you!"

ajthepoolman
Constraint Violating Yak Guru

384 Posts

Posted - 2003-07-08 : 12:22:02
Is your Application.cfm page making the connection to the database?

Is the variable a session variable or is it being passed as a parameter, or stored in a cookie?

Aj

Go to Top of Page
   

- Advertisement -