We have a need to do a select query. The "WHERE" of the SQL statement

We have a need to do a select query. The "WHERE" of the SQL statement will need to be dynamic.The reason is that this is a "search" that our users are doing. They may select to search on 1 to 5 fields. In other words, the columns in our where clause will vary depending on the user situation. When using the Query Database smart node, we are struggling to find a way to accomplish this. Is there a way to get this done? Thanks!...

OriginalPostID-131608

OriginalPostID-131608

  Discussion posts and replies are publicly visible

Parents
  • I've accomplished this in the Query DB smart node by including all columns in the WHERE clause with 'LIKE', such as:

    ..WHERE Column1 LIKE ac!col1Filter AND Column2 LIKE ac!col2Filter AND Column3 LIKE ac!col3Filter AND Column4 LIKE ac!col4Filter AND Column5 LIKE ac!col5Filter

    You can populate any search variables (one to all) with text, leaving ones not entered blank.
Reply
  • I've accomplished this in the Query DB smart node by including all columns in the WHERE clause with 'LIKE', such as:

    ..WHERE Column1 LIKE ac!col1Filter AND Column2 LIKE ac!col2Filter AND Column3 LIKE ac!col3Filter AND Column4 LIKE ac!col4Filter AND Column5 LIKE ac!col5Filter

    You can populate any search variables (one to all) with text, leaving ones not entered blank.
Children
No Data