Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Dynamic XMLelement generation
Hi ,
I have a very small question regarding Xmlelement function , can the
XMLelement tag name can be generated dynamically (base on CASE
expression / decode).
I am using the new XSQL capabilities in oracle 9i and i failed to do it
This is very simple case , I would like to know the concept :
SQL> select table_name from user_tables;
TABLE_NAME
DBA_CONSTRAINTS DBA_INDEXES DBA_IND_COLUMNS DBA_LOBS DBA_SEQUENCES DBA_SOURCE DBA_TABLES DBA_TAB_COLUMNS DBA_TRIGGERS DBA_VIEWS
CASEWHENTABLE_NAME='DBA_CONSTRAINTS'THENXMLELEMENT(NAME"DBA_LOBS")ELSEXMLELEMENT(NAME"DBA_CONSTRAINTS")END
![]() |
![]() |