Grid filtering using Where IN [array]

Hi,
I might be overlooking a post, but i cannot find an answer to this.
I want to filter a grid using a global variable (array) to filter in the where clause.
For example the content of the [variable] is : 5;11;16

Select * from Product
where ProductTypeID in ([variable])

What is best practice to do this?

I get an error message complaining about "… in (Array) )) nm_sel_esp "

Thanks!

remember to add quotes if you dealing with strings
but in your example your using semicolon, use commas
just tested and it worked for me in a sql select in the grid

Kevin

Place it in the SQL Settings (left hand side) of the grid application: SELECT …WHERE field1= ‘[variable_name]’…

[QUOTE=Kdriscoll;15964]remember to add quotes if you dealing with strings
but in your example your using semicolon, use commas
just tested and it worked for me in a sql select in the grid

Kevin[/QUOTE]

Thanks, the comma separator did i for me. The default separator from lookups is ; but you can change it.