So i'm trying to run the following sql but the output is not as anticipated. I would like to, instead of have both in one column, separate the views from the aliases. i'd appreciate your help guys =)
db2 "select rtrim(tabschema)||'.'|| rtrim(tabname) as Schema_View from syscat.tables where type= 'V' UNION ALL select rtrim(tabschema)||'.'|| rtrim(tabname) as Schema_Alias from syscat.tables where type='A'" |more
in that case , think about having 2 separate columns and decide what should be in the "view" column when the item is an alias, and what should be in the "alias2 when the item is a view. Think about what the CASE expression might do for you. If you get told the answer, how will you learn?