Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm looking for a way to refer to a DB_Name in the below WHERE condition (the one below is, obviously, not working). For the data model purpose I'd like to keep the condition within this bit, not load it into another table.
DBs:
SELECT DB_Name FROM Configuration;
Data:
LET NoOfDBs = NoOfRows('DBs');
FOR i = 0 to $(NoOfDBs)-1
LET DB_Name = Peek('DB_Name', $(i), 'DBs');
SELECT
'$(DB_Name)' AS DB_Name,
Dim_1
FROM $(DB_Name).Table_1 WHERE $(DB_Name) NOT IN ('DB_1');
NEXT
Regards,
Przemek
That's what I was afraid of, thank you Jonathan.