I have a table tbl_price and a filed inside it which save data like 'Rs 20,000 extra over model M3.5 V2'. The data is already saved with different amount of Rs, but the remaining text is same.
Now i need to update only the text in this column, not the amount, ie lets say 'Rs 21,000 extra over model MV2 3.5'. I just need to shuffle the last portion of the text & update it only. Can partial update be possible?
|
| Author: vipul 07 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
hi, i think partial update is not possible for that you have to do hole update.
Please Rate This Answer If They Helpful
Thanks & Regards Patel Vipul
|
| Author: ABitSmart 07 Nov 2009 | Member Level: Diamond | Rating:   Points: 3 |
You can use REPLACE function.
e.g.,
Update table tbl_price Set columnName = Replace(columnName, 'TextToFind', 'TextToReplace') where columnName like 'TextToFind'
Perhaps you can skip the where clause
Kind regards, ABitSmart DNS Web-master, DNS MVM My blog Thoughts.exe
|
| Author: Shameer 08 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
UPDATE table tbl_price SET column_model = 'MV2 3.5', column_amount = 'Rs 21,000' WHERE column_model = 'M3.5 V2'
|
| Author: Shameer 08 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
UPDATE table tbl_price SET column_model = 'MV2 3.5', column_amount = 'Rs 21,000' WHERE column_model = 'M3.5 V2'
Please rate if this useful..
|
| Author: mithun 16 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
u can use UPDATE query for dis....
|