Concat SQL statement
by Johan, February 23, 2006 03:28
I'm trying to concatenate SQL statements in a loop but don't know if this is possible in ODBIC.
For example (syntax isn't correct, I know):
<% SET input="Europe,Asia Pacific,Greater China" %>
<% SET strSQL = "Select * from table where region = " %>
<% WHILE $input %>
<% SET name = $split(input, ",") %>
<% strConcat = strConcat & '$name$' & "or region = " %>
<% ENDWHILE %>
Output woule be something like: strSQL & strConcat = "Select * from table where region = 'Europe' or region = 'Asia Pacific' or region = 'Greater China'"
Is this possible?
Name E-mail optional TopicMessage:
HTTP Link: Link text: