I am writing a Crystal Command for use with a Cache DB.
My parameter sent in to the command is a STRING variable in the format of Prog&Prog&Prog (ex. 1-BA04&1-BA05&7-FN01) with no preceding or trailing characters such as ' " space, etc.
The where clause in my query looks similar to this:
WHERE program_code IN {?program_list}
Because this is alphanumeric list, I need the format to ultimately be:
WHERE program_code IN '1-BA04','1-BA05','7-FN01'
My question is how to add the beginning and ending single quote ' AND the ',' (single quote comma single quote) between the program names.
I have modified my WHERE to look like this:
WHERE program_code IN REPLACE(?program_list),'&',''',''')
I'm not sure if that will truly replace my & with ',' and I'm still missing the beginning and ending '
Any help in this would be most appreciated.
