Forums
This topic is locked
Split function using two tables
Posted 17 years ago
1
has voted
17 years ago darrell heath posted:
I have a delimma with retrieving an iteration of values from table2 (string) once I have the values from table1 (number - format 1,45,3,56) split.-------start---------
set rsOptions=conn.execute("SELECT options FROM tblinventory where makeid =" & catid & ""

if not rsOptions.eof and not rsOptions.bof then
if rsOptions("options"

fieldSplit = rsOptions("options"

newStr = Split(fieldSplit, ","

max = UBound(newStr)
set rsOpt=conn.execute("SELECT * FROM tblinventoryoptions where id =" & max & ""

for i = 0 to max
opt = newStr(i)
response.write opt & ","
response.write ("<br>" & rsOpt("title"

next
rsOpt.Close
Set rsOpt = Nothing
end if
end if
rsOptions.Close()
Set rsOptions = Nothing
--------End---------------
With the above I get iteration of number values split from the inventory table, but I can't seem to 'compare' the same values to another table (tblinventoryoptions) and display just the 'title' for the values instead of the number.
Any help would be appreciated.
h