I'm using Ingres Database and I've this procedure that create a text file with a list of tables. How i can call the file into the where condition?

select request_num,table_name,temp_table
from tables
where temp_table in ('$/tmp/dba_tablelist')

Actually when i run the file is fine, the only problem is that the where condition can't see the list of table, also if the table is just one.


The short answer, I believe, is I don't think you can like that.

I believe you'll have to use the copy() SQL statement to load the file into a temporary table (DECLARE GLOBAL TEMPORARY TABLE session.tables) and use

SELECT temp_table FROM session.tables 

in the IN clause.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.