Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ellor1138/a83071339224d9f19f176933a11f5be0 to your computer and use it in GitHub Desktop.
Save ellor1138/a83071339224d9f19f176933a11f5be0 to your computer and use it in GitHub Desktop.
Find value in comma delimited list (SQL)
loc.query = New Query(datasource=get("dataSourceName"));
loc.query.setSQL(
SQL="SELECT column FROM table WHERE (',' + RTRIM(columns) + ',') LIKE '%,#value#,%'"
);
loc.query = loc.query.execute().getResult();;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment