Modifying the value in a datarow

Posted by Santhosh.Nallavelli under C# on 8/10/2012 | Points: 10 | Views : 763 | Status : [Member] | Replies : 1
Hi All ,

I have a datarow in which one of the column values having following structure :
ColName- Value
ColumnA - HYD , DEL , BLR

Now i want to modify the datarow by iterating each and every code like HYD , DEL and so on
annd i want to replace the value like the following way

ColName- Value
ColumnA - Hyderabad , Delhi , Bangalore .

Please suggest me .




Responses

Posted by: Vikash on: 8/11/2012 [Member] Starter | Points: 25

Up
0
Down
You can try following SQL statement

select 'ColumnA'=
CASE ColName
WHEN 'HYD' THEN 'Hyderabad'
WHEN 'DEL' THEN 'Delhi'
WHEN 'BLR' THEN 'Bangalore''
END
FROM tableName

I hope this will help you....

Regards,
Vikash Pathak

Santhosh.Nallavelli, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response