Author |
Message |
420
Yavvanam Kaatesina Bewarse Username: 420
Post Number: 2646 Registered: 12-2006 Posted From: 85.144.112.59
Rating:N/A Votes: 0(Vote!) | Posted on Thursday, October 11, 2007 - 12:49 pm: | |
to be precise .. for your XML UPDATE your_xml_tablle SET your_xml_col = UPDATEXML(your_xml_col, '/CreditCardType/text()','xxx', '/CardHolderName/text()','xxx') ; if you want to use where clause use ... WHERE EXISTSNODE(your_xml_col, '//XML_ELEMENT') = 1; http://www.fairandlovely.in/ |
Symbol_of_king
Kurra Bewarse Username: Symbol_of_king
Post Number: 1415 Registered: 12-2005 Posted From: 198.182.163.125
Rating:N/A Votes: 0(Vote!) | Posted on Thursday, October 11, 2007 - 12:48 pm: | |
|
420
Yavvanam Kaatesina Bewarse Username: 420
Post Number: 2645 Registered: 12-2006 Posted From: 85.144.112.59
Rating:N/A Votes: 0(Vote!) | Posted on Thursday, October 11, 2007 - 12:44 pm: | |
UPDATE your_xml_tab SET your_XML_column = UPDATEXML(your_XML_column, '/CreditCardType/text()', 'xxx'); UPDATE your_xml_tab SET your_XML_column = UPDATEXML(your_XML_column, '/CardHolderName/text()', 'xxx'); this will work only for XMLTYPE in oracle .. check your XPATH based on ur XMLelement
http://www.fairandlovely.in/ |
Basky_indya
Yavvanam Kaatesina Bewarse Username: Basky_indya
Post Number: 3844 Registered: 03-2006 Posted From: 157.130.150.242
Rating:N/A Votes: 0(Vote!) | Posted on Thursday, October 11, 2007 - 10:34 am: | |
ok will try thokkalo signature |
Pedarayudu
Pilla Bewarse Username: Pedarayudu
Post Number: 787 Registered: 04-2007 Posted From: 129.138.18.85
Rating:N/A Votes: 0(Vote!) | Posted on Thursday, October 11, 2007 - 10:28 am: | |
CASE WHEN anta try chesyi mama.. DECODE equivalent in SQL server |
Pedarayudu
Pilla Bewarse Username: Pedarayudu
Post Number: 786 Registered: 04-2007 Posted From: 129.138.18.85
Rating:N/A Votes: 0(Vote!) | Posted on Thursday, October 11, 2007 - 10:20 am: | |
atta aithe naaku telavadu.. manadi oracle SQL server esperts |
Basky_indya
Yavvanam Kaatesina Bewarse Username: Basky_indya
Post Number: 3843 Registered: 03-2006 Posted From: 157.130.150.242
Rating:N/A Votes: 0(Vote!) | Posted on Thursday, October 11, 2007 - 10:19 am: | |
it is t-sql,sql2000 thokkalo signature |
Pedarayudu
Pilla Bewarse Username: Pedarayudu
Post Number: 785 Registered: 04-2007 Posted From: 129.138.18.85
Rating:N/A Votes: 0(Vote!) | Posted on Thursday, October 11, 2007 - 10:18 am: | |
try decode in ur insert statement |
Basky_indya
Yavvanam Kaatesina Bewarse Username: Basky_indya
Post Number: 3842 Registered: 03-2006 Posted From: 157.130.150.242
Rating:N/A Votes: 0(Vote!) | Posted on Thursday, October 11, 2007 - 10:13 am: | |
I have a column inside a table which gets inserted 1 record. Its a xml type big string with nodes . ex. <CreditCardType>AMEX</CreditCardType>CardHolderNam e>123456</CardHolderName> I want to just replace them with xxx so that it becomes <CreditCardType>xxx</CreditCardType>CardHolderName >xxx</CardHolderName> . just before inserting replacing with xxx, or after inserting immd updating statement will do. encryption not reqd, just hardcoding xxx will be sufficient. pls put some focus on this thokkalo signature |