Hi, Facing issue with DB query node while using simple sub-query. sel

Hi, Facing issue with DB query node while using simple sub-query.

select TOP 12 ID from (select ID from PROJECT WHERE ID=ac!prjId )_result

While validation showing error:

"Errors
There was a problem during the validation of the SQL statement with the database

The SQL Query is invalid, com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword \\'WHERE\\'."

If i remove inner "WHERE ID=ac!prjId" condition it works fine. Appian 7.6 + MSSQL Server2008 + Jboss 6.2

Thanks, Ritesh
...

OriginalPostID-135109

OriginalPostID-135109

  Discussion posts and replies are publicly visible

Parents
  • Hi Marco,
    :) It works. Thanks a lot. I feel stupid when i copied your last statement as it is :(. So, finally with

    select TOP 12 ID from (select ID from PROJECT WHERE [appian_sandbox_new].[dbo].[PROJECT].ID=ac!oldID)_result

    OR

    select TOP 12 ID from (select ID from PROJECT WHERE [PROJECT].ID=ac!oldID)_result

    queries it is working. I did not create custom datasource instead used the same existing datasource name.

    Thanks again, Ritesh
Reply
  • Hi Marco,
    :) It works. Thanks a lot. I feel stupid when i copied your last statement as it is :(. So, finally with

    select TOP 12 ID from (select ID from PROJECT WHERE [appian_sandbox_new].[dbo].[PROJECT].ID=ac!oldID)_result

    OR

    select TOP 12 ID from (select ID from PROJECT WHERE [PROJECT].ID=ac!oldID)_result

    queries it is working. I did not create custom datasource instead used the same existing datasource name.

    Thanks again, Ritesh
Children
No Data