how to use xmltable in oracle?

Chick Flick

New Member
I am using Oracle's XML DB to create user profiles. I stored user profiles in a single XMLTYPE column with other relational columns (id, username, password) in the table. The XML is of the following format:\[code\]<profile><subject>I <action>like <object>sports</object> ... <object>music</object </action> </subject></profile>\[/code\]I used the following query,\[code\]SELECT *FROM user,XMLTABLE( '//profile' PASSING user.profile return COLUMNS action VARCHAR2(20) PATH '/subject/action', object VARCHAR2(30) PATH '/subject/action/object');\[/code\]which gives me nothing. How could I make this thing work?
 
Back
Top