Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: XML in data, how do display just one tag?
"SN" <throne7_at_my-deja.com> wrote in message
news:c2ec2c5b.0111070658.2d16dc0_at_posting.google.com...
> Hello Gurus,
>
> Could you tell me how to do this? I have a table within which there
> is a huge (1024 chars) column that contains an XML string. I need a
> query that will query this table for all the rows that has a special
> tag in this XML string and return the transaction_id and this special
> tag in the XML only.
>
> One might do this:
>
> select transaction_id,parameter_str from sometable where parameter_str
> like '<cm_technology>TERAYON PROPRIETARY</cm_technology>'
>
> However, this will pull out the entire parameter_str when all I want
> to display
> is just the transaction_id and the
> '<cm_technology>TERAYONPROPRIETARY</cm_technology>' tag.
select transaction_id,'<cm_technology>TERAYON PROPRIETARY</cm_technology>'
from sometable where parameter_str
like '%<cm_technology>TERAYON PROPRIETARY</cm_technology>%';
You might also consider if performance becomes an issue using a text index and the contains clause instead Received on Wed Nov 07 2001 - 09:05:32 CST
![]() |
![]() |