Query tag problem

I have a problem in a query tag. This is my query:

select cd_response from response where id_status = 0 and id_barcode_supplier = {[.]FEEDER_CODE} order by dt_time_stamp

FEEDER_CODE tag is in the same folder of query tag.
id_barcode_supplier and feeder_code are two strings, but I get this error:
Last Error Error evaluating tag: Incorrect syntax near the keyword ‘order’. ERROR

How can I fix?


Try putting {[.]FEEDER_CODE} in single quotes like this ‘{[.]FEEDER_CODE}’ so that it reads it in as a string.

Now it works.

Thank you so much!


You know… in 8.0.16 version of Ignition this trick is not working.
Who can give some advice how to link a tag in query??

This works for me. Can you share more about your tag structure and the query you’re using?
Here are some working examples when looking for record by int and strings.

SELECT * FROM table WHERE id = {[.]Int Tag}
SELECT * FROM table WHERE name = '{[.]StringTag}'

I use Query tag
I need use a string tag inside it, but this ‘{[.]StringTag}’ thing is not working… If I type string manually (for example ‘Lazy Pumpstation’), so it works, but when I link a string tag like ‘{[.]PumpStationName}’ it does not work…

Can you share some screenshots?