I want to filter a SQL Query on a table using the 2nd column of the selected item in a list.
SELECT a_LongName
FROM Employee
WHERE HomeLocation_ID =
{Root Container.Locations.data}[{Root Container.Locations.data},1]
This syntax gets accepted but the query fails with the following message:
Exception: Error running query:
SQLQuery(query=SELECT a_LongName
FROM Employee
WHERE HomeLocation_ID =
Dataset [4R ⅹ 2C][Dataset [4R ⅹ 2C],1], database=VehicleDb)@0ms
On: Main Window 3.Root Container.Table.data
caused by GatewayException: Incorrect syntax near ‘4R ⅹ 2C’.
caused by SQLServerException: Incorrect syntax near ‘4R ⅹ 2C’.
What syntax should I use?
Thanks,
Dave