[Info-ingres] Execute Dynamic SQL within Stored Procedure

Alexander McClune alexmcclune at googlemail.com
Thu Jan 15 13:26:27 UTC 2015


Hi,

Just so I understand, you want to query the database to return the primary keys of certain tables.

I would usually write a SQL Script that exports the query results to a text file, or create another database table but it really is up to you.

Are you using Windows/Linux/Unix and it is Ingres?

I would start by looking at the table iicolumns but narrow it down to the tables that matter to you: 

"SELECT * FROM iicolumns WHERE table_name like = 'hb'+'%' etc.  

Obviously you only need some of the columns returned and can restrict it to primary keys by adding a clause in against the key columns...

Hope it helps.



More information about the Info-ingres mailing list