Skip to main content
Question

InLineQuerier: Is it possible to Use an inbound Field as the WHERE Clause? Possible syntax error.

  • September 22, 2017
  • 2 replies
  • 12 views

Hi Folks,

I have successfully done a Cross Join In one InlineQuerier where the contents of a field called Query_Filter - is the WHERE Statement I want to apply in another InlineQuerier. I can get the statement to work fine when I paste it in to the second querier - EG

Select * FROM "Detected" WHERE (ChemCode ='7440-38-2' AND Concentration > 160 )

However when I Write SELECT * FROM "Detected" WHERE Query_Filter It doesnt work.

(Query_Filter just containing the text string above.)

Im missing something.

Any thoughts ?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • 8394 replies
  • September 22, 2017

Maybe try the following:

SELECT * FROM "Detected" WHERE @Value(Query_Filter)

takashi
Celebrity
  • 7843 replies
  • September 22, 2017

Hi @pilgrimjake, I think your second query is equivalent to this one if the Query_Filter stores the text string "(ChemCode ='7440-38-2' AND Concentration > 160 )".

SELECT * FROM "Detected" WHERE '(ChemCode =''7440-38-2'' AND Concentration > 160 )'

A string literal won't be evaluated as an expression when the query is executing, so this query would not work as expected.

Also, the @Value function seems not to be available in a query for the InilineQuerier.

Probably you will have to think of another approach depending on the requirement.