G
Guest
hey all,
i have my ideas on how i can do this but i just want to get different
perspective.
i have a string that contains comma-separated values.
(a,b,c)
i want to create a string that looks like the following
('a' and 'b' and 'c')
how would you do this?
the way i'm thinking is like this
Dim ary As Array
ary = Split(value, ",")
For Each item As String In ary
sb.Append(Chr(39))
sb.Append(item)
sb.Append(Chr(39))
sb.Append(" AND ")
Next
but my problem is how to get rid of the trailing AND?
thanks,
rodchar
i have my ideas on how i can do this but i just want to get different
perspective.
i have a string that contains comma-separated values.
(a,b,c)
i want to create a string that looks like the following
('a' and 'b' and 'c')
how would you do this?
the way i'm thinking is like this
Dim ary As Array
ary = Split(value, ",")
For Each item As String In ary
sb.Append(Chr(39))
sb.Append(item)
sb.Append(Chr(39))
sb.Append(" AND ")
Next
but my problem is how to get rid of the trailing AND?
thanks,
rodchar