I'm not sure if what I'm trying can be done. I have the following situation:
variables:
sql_jobid
sql_description
....etc
where jobid, description, etc are fields from my database.
I would like to call these variables into an if, then reading the second part of the variable from the database so I don't have to type out the same thing 40 times... Here's a snippet of what I'm trying (who knows if the syntax is right though):
sql = "select * from jobs where"
first = "true"
for each x in rs.fields
if first = "true" then
sql = sql sql_(x.name) <----- Here's one place I'm
trying it.
first = "false"
else
sql = sql sql_(x.name)
end if
next
sql = sql ";"
rs.open sql,conn
Thanks Alot!!!
Eric
variables:
sql_jobid
sql_description
....etc
where jobid, description, etc are fields from my database.
I would like to call these variables into an if, then reading the second part of the variable from the database so I don't have to type out the same thing 40 times... Here's a snippet of what I'm trying (who knows if the syntax is right though):
sql = "select * from jobs where"
first = "true"
for each x in rs.fields
if first = "true" then
sql = sql sql_(x.name) <----- Here's one place I'm
trying it.
first = "false"
else
sql = sql sql_(x.name)
end if
next
sql = sql ";"
rs.open sql,conn
Thanks Alot!!!
Eric