var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: DB2 syscolumn join to a user table
I'm looking for a solution to writing a query to join to the syscolumn table and perform a 'minimum' function on all columns in a certain table.
I've started with something like this but am not getting the results I'm looking for.
select min('+colname+') from demand_table, sysibm.syscolumns
where '+colname+' = name
and tbname = 'DEMAND_TABLE'
I do not think you can do what you want in a single step. You need to generate the SQL you want then execute that SQL.
select 'select min('||colname||') from demand_table' from syscat.columns where tabname = 'DEMAND_TABLE'