I speak Unix, but forget SQL queries, could you please help.... me write the code
I will run this from a unix command line, from a remote computer so I need to connect to the database too.
There is one database called DB and two tables called T1 and T2. I am interested in using some data from T1 to query against T2
@ARRAY = SELECT id FROM T1 (read each entry of the column 'id' into an array)
Foreach $entry (@ARRAY) (loop through each entry)
SELECT $entry
FROM T2
WHERE column = '1'
I will run this from a unix command line, from a remote computer so I need to connect to the database too.
There is one database called DB and two tables called T1 and T2. I am interested in using some data from T1 to query against T2
@ARRAY = SELECT id FROM T1 (read each entry of the column 'id' into an array)
Foreach $entry (@ARRAY) (loop through each entry)
SELECT $entry
FROM T2
WHERE column = '1'