BC
|
| Posted: 05/30/2002, 10:57 AM |
|
Hey All,
I have a quick one. I am trying to display a list of values from records based on a LIKE statement that looks for a Session value called UserEmail. Here is what I have tried thus far without success.
sEMAIL = " (CC_Email LIKE '%(" & ToSQL(Session("UserEmail"), "Text")" & "%')"
sSQL = "ServiceName from PPD_All_Services"
sSQL = sSQL & " where " & sEMAIL
openrs rs, sSQL
EmailLKUP= GetValue(rs, "ServiceName")
I expect when you all see this you will know what I have goofed on, but I have stared at it for 2 hours with out a clue. I think the big problem is pulling the email address into the query.
Thanks for the help.
|
|
|
 |
Ken Hardwick
|
| Posted: 05/30/2002, 12:52 PM |
|
sEMAIL = " (CC_Email LIKE '%(" & ToSQL(Session("UserEmail"), "Text")" & "%')"
The "toSQL" function is also adding '' around the session value..ie...
so ends up something like...'%'????'%'
Also...I see no select statement...
so change to...
sEMAIL = " (CC_Email LIKE '%(" & Session("UserEmail") & "%')"
sSQL = "Select ServiceName from PPD_All_Services"
sSQL = sSQL & " where " & sEMAIL
openrs rs, sSQL
EmailLKUP= GetValue(rs, "ServiceName")
|
|
|
 |
|