I would like to take out the following "union" and just do 1 select in the table instead of 6,
is it possible ?
select field1 as FIELD_OUT from table
select field2 as FIELD_OUT from table
select field3 as FIELD_OUT from table
select field4 as FIELD_OUT from table
select field5 as FIELD_OUT from table
select field6 as FIELD_OUT from table
with a(i) as (
when 1 then t.tabschema
when 2 then t.tabname
when 3 then t.owner
when 4 then t.ownertype
when 5 then t.type
when 6 then t.status
from syscat.tables t, a
where t.tabschema='SYSCAT' and t.tabname='TABLES'
select owner,user from schema.LIST_PERSON_ITEM
because there is no detailed description, we can not guess what you need,want..
be more specific.. add small example if possible
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be