I am using a Query Database Smart Service to query my database to return a set o

I am using a Query Database Smart Service to query my database to return a set of values for a logged in users category. This works great when the category has one value but when it contains multiple values it fails. Here is the configuration for the node.

query: SELECT site,status FROM `srrequestcdt` where `category` in (ac!loggedinusergroup_txt) AND `team` = "NA"
when my input is one value it works fine but if it is more I get an error "There is a problem with task “Query Database” in the process “Project Dashboard”. There was a problem executing the SQL query. SQL Message : [Ljava.lang.String; cannot be cast to java.lang.String"

Any suggestions? I can provide more information if needed....

OriginalPostID-99589

OriginalPostID-99589

  Discussion posts and replies are publicly visible

Parents
  • Just to add the comment from csteward above, you can also join your multiple input into a single string separated with a common delimiter such as comma (hence use
    =',' & joinarray (pv! ArrayInput, ',') & ','

    Note: The ac input is set to a single text instead of multiple.

    Then you can use INSTR or CHARINDEX to locate the pattern of , [colValue], in your column values. Example in SQL Server:

    SELECT * FROM [tableName] WHERE CHARINDEX (',' + [colNameToSearch] + ',' , ac! Input);

    Same method if it's in Oracle but using different function, i.e. INSTR
Reply
  • Just to add the comment from csteward above, you can also join your multiple input into a single string separated with a common delimiter such as comma (hence use
    =',' & joinarray (pv! ArrayInput, ',') & ','

    Note: The ac input is set to a single text instead of multiple.

    Then you can use INSTR or CHARINDEX to locate the pattern of , [colValue], in your column values. Example in SQL Server:

    SELECT * FROM [tableName] WHERE CHARINDEX (',' + [colNameToSearch] + ',' , ac! Input);

    Same method if it's in Oracle but using different function, i.e. INSTR
Children
No Data