Tag SQL Query

Tried to query the DB calvalue using the tag path site35/number but was unsuccessful. When using siteid=35 it works ok. Is it possible to use the path?

select top 1 calvalue from flowcalibration where siteid ={[~]site35/number} order by t_stamp desc 

Yes, you should be able to use another tag’s value in the SQL query. I think the path should be a little bit different with no ~. Did you use the tag link button to the right of the query? Is the DB query tag in the same folder as the number tag?

Did you use the tag link button to the right of the query? Yes

Is the DB query tag in the same folder as the number tag? Same parent folder but different subfolder

Ok, my bad…wrong data type. Fixed now it works