AboutElliot Mak Expertise I can answer questions with regarding to Oracle DB (8i, 9i, 10g) installation, configuration, administration, Data Guard, SQL, and PL/SQL (Procedures, triggers, functions).
Experience I am an Oracle DBA, Senior PA, Project Manager, and Data Architect with 10 years of experience.
Question Good day Sir!
How do I create a view where the columns are based on data in the table?Is that possible? For example I have an audit table:
a_logno varchar(10)
a_eventid varchar(10)
a_datetime date
a_userid varchar(10)
say the values for a_eventid are A, B, C
and i want to create a view that will look like this:
a_logno varchar(10)
A datetime
B datetime
C datetime
and the contents of columns A,B,C are the datetime corresponding to the events.
Is this possible Sir?
Would really appreciate your help. Thanks very much!
Answer Good day Vee,
I apologize for the late reply. It is currently a long weekend here in Canada and I just happened to check my email.
To answer your question, it looks like you want to transpose the row to column. With Oracle, you can use the following