Toad World® Forums

Include a column in the query which is not a part of the query.

Hi all,

I have created a Materialized View and have a query in that which works fine. Now i have to add a column in the SQL so that when this MV is used in a QUERY(QUERY MANAGER) few columns will be UNPIVOTED and put in the “New column”

I am unsure how to add the column which is not the part of any where condition.

This is how my query starts after "E.Accessible i shd have one more column name .

SELECT distinct D.OPRID, O.oprdefndesc,
RU.ROLENAME ROLE, D.OPRCLASS PERMISSION_LIST,
E.TREE_NAME, E.ACCESS_GROUP, E.ACCESSIBLE,

Finally

Please pour your suggestion

Finally my query has OPRID,OPRDEFNDESC,ROLE,PERMISSION_LIST,TREE_NAME,ACCESS_GROUP,ACCESSIBLE,“NEW COLUMN TOBE INCLUDED”,NODE1,NODE2,NODE3,NODE4,NODE5,NODE6,NODE7,NODE8 When the query is built all the nodes will be unpivoted and put in the new column.