Thursday, October 22, 2009

Split and Search

Presented at the GBN conference on a way to provide users the way to enter a comma delimited list of values into a prompt and then use a database function to split those values in order to return the list as a table that can be used in joins.

WHERE rs_tb_cms_groups.group_ID IN ( SELECT rs_tb_cms_groups.group_ID FROM @Prompt('Group
Name ','A',{'California','New York'},mono,constrained,not_persistent,))

If anyone wants the full article including the Oracle and SQL server code please contact Kevin McManus at answers@mcmanusconsulting.com

No comments:

Post a Comment