AtokeRokkaree
New Member
Current select statement:\[code\]SELECT * FROM vw_svc200_open WHERE (CUSTNMBR = '::CUSTNMBR::') ORDER BY ::sortcolumn::\[/code\]This works and all is well. But now I need to modify this select string to apply an extra filter.\[code\]SELECT * FROM vw_svc200_open WHERE CASE WHEN ::CUSTNMBR:: = 'ABC123' THEN (CUSTNMBR = '::CUSTNMBR::' AND CNTCPRSN = '::CNTCPRSN::') ELSE (CUSTNMBR = '::CUSTNMBR::') END ORDER BY ::sortcolumn::\[/code\]So basically I need to have my select filter on customer number and if customer number is ABC123 then I also need it to filter on Contact person...The \[code\]::CUSTNMBR::\[/code\] and \[code\]::CNTCPRSN::\[/code\] are url string variables (What are those called again?). Ex. \[code\]www.mywebsite.com/mypage.asp?Custnmbr=ABC123\[/code\]Am I going to have to add some logic to the asp page (i.e. IF/Then) to set a variable, and then pass that variable to the *fp_sQry=* line?