|
I have to update an Oracle table which contains in a column a stringvalue like p:\db1\photos\streetname\picture.jpg. This stringvalue has to be changed in the following: p:\db1\photos\cityname\streetname\picture.jpg. The new value to be added in the string is cityname. This has to be done for over 600 records. How can I do this?
(comments are locked)
|
|
Please use replace in Oracle, can be done in one update statement. http://www.techonthenet.com/oracle/functions/replace.php Probably you need substring as well.
(comments are locked)
|
|
we can help you better if you are using SQL Server. Any chance of converting to MS SQL Server ? Or maybe you should try to post your oracle related question over at dbforums.com. SQLTeam specialize in Microsoft SQL Server
(comments are locked)
|
|
are you just trying to replace one string with another in all 600+ records ? the string does or does not change ? in other words, replace 'p:\db1\photos\streetname\picture.jpg' with 'p:\db1\photos\cityname\streetname\picture.jpg' in all records Jim
(comments are locked)
|
|
I'm not an expert in Oracle, but I do know SSIS. Use an OLEDB Source Component, retrieve your data, pull it down the pipe to a Derived Column Compenent, Use an Expression to update the column and push to an OLEDB Destination Component. I suppose this would work. I'm sure there are other possible solutions. If you don't have access to SSIS, then I would suggest creating a script that uses string manipulation to transform the data. In TSQL you could possibly do this...
This will return the following result sets... SUBSTRING AND CHARINDEX are easy to use and powerful once understood. See BOL at http://msdn.microsoft.com/en-us/library/ms186323.aspx for more information.
Jun 15 '10 at 10:00 PM
Jay D
(comments are locked)
|

