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.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-01-24 : 08:51:47
|
Lynn writes "I am trying to pass a SQL string to an access database through an ASP page. I have a session variable (called "customerid") that I want to use in the WHERE clause. How do I set up the SQL statement to do this? I have pasted an example of what I'm trying to do below. Example: ------------------------------------------------------------------------------------------------------------------------------- SELECT UserSecurity.CustomerID, Customer.CustomerID, Applications.ApplicationName, Applications.ApplicationURL, Applications.ApplicationVersion FROM ((Customer INNER JOIN CustomerApplications ON Customer.CustomerID = CustomerApplications.CustomerID) INNER JOIN UserSecurity ON Customer.CustomerID = UserSecurity.CustomerID) INNER JOIN Applications ON CustomerApplications.ApplicationID = Applications.ApplicationID WHERE (((Customer.CustomerID)=4)); ---------------------------------------------------------------------------------------------------------------------------------- Instead of WHERE(((Customer.CustomerID=4));, I want WHERE(((Customer.CustomerID=session("customerid") but I can't figure out the correct syntax. Please help. Much thanks in advance. Lynn" |
|
|
|
|