Calling SQL experts for masking colun...   Independent houses near kukatpally | Apartments in Pragathi Nagar | AndhraVaani.com | Log Out | Topics | Search
Register | Edit Profile

Bewarse TalkArchives - 2007Bewarse Bewarse BewarseArchive through October 15, 2007 � Calling SQL experts for masking colun value Previous Next

Author Message
Top of pagePrevious messageNext messageBottom of pageLink to this 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:Edit PostDelete PostView Post/Check IP

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/
Top of pagePrevious messageNext messageBottom of pageLink to this message

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:Edit PostDelete PostView Post/Check IP

Top of pagePrevious messageNext messageBottom of pageLink to this message

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:Edit PostDelete PostView Post/Check IP

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/
Top of pagePrevious messageNext messageBottom of pageLink to this message

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:Edit PostDelete PostView Post/Check IP

ok will try
thokkalo signature
Top of pagePrevious messageNext messageBottom of pageLink to this message

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:Edit PostDelete PostView Post/Check IP

CASE WHEN anta try chesyi mama.. DECODE equivalent in SQL server
Top of pagePrevious messageNext messageBottom of pageLink to this message

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:Edit PostDelete PostView Post/Check IP


atta aithe naaku telavadu.. manadi oracle

SQL server esperts
Top of pagePrevious messageNext messageBottom of pageLink to this message

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:Edit PostDelete PostView Post/Check IP

it is t-sql,sql2000
thokkalo signature
Top of pagePrevious messageNext messageBottom of pageLink to this message

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:Edit PostDelete PostView Post/Check IP

try decode in ur insert statement
Top of pagePrevious messageNext messageBottom of pageLink to this message

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:Edit PostDelete PostView Post/Check IP

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