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
  • 7 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 ?

2 replies

david_r
Evangelist
  • September 22, 2017

Maybe try the following:

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

takashi
Influencer
  • 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.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings