I have a table called Structure1 in that I want to store Structure_name values into an array and compare with another table Structure2 with column item and display the values if matching.
DECLARE @Structure1 TABLE
(
Structure_name VARCHAR[128]
)
SELECT Structure_name FROM Structure1
SELECT COUNT(*) INTO xyz FROM Structure1
FOR i=1..xyz
SELECT Structure_name FROM Structure2 WHERE ITEM = Structure[i]
PRINT Structure_name values..
END FOR