- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: remove word from column
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-21-2005 04:05 AM
тАО10-21-2005 04:05 AM
Re: remove word from column
Complementing Patty answer, you should see what you are going to update before (I strongly recomend it) doing it:
select address_column, replace( address_column,'speed test',null) address_column_replaced
from table_name
where address_column != replace( address_column,'speed test',null);
And after above query results were verified, do the update:
update table_name
set address_column = replace( address_column,'speed test',null)
where address_column != replace( address_column,'speed test',null);
Best Regards,
Eric Antunes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-21-2005 04:06 AM
тАО10-21-2005 04:06 AM
Re: remove word from column
Complementing Patti's answer...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-21-2005 04:54 AM
тАО10-21-2005 04:54 AM
Re: remove word from column
I have the list of tn's that I used when I appended that field but now I can not seem to get it to work.
#!/usr/bin/sh
cat test3|while read i
do echo $i
sqlplus -s admin/admin <
set customer = replace (customer,'Speed Trail','');
where tn = ($i);
commit;
quit
EOF
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-21-2005 05:17 AM
тАО10-21-2005 05:17 AM
Re: remove word from column
Also is tn a number? If not you will need to use quotes around '$i'.
You could use
update cust_table
set customer =
replace (customer,'Speed Trail','')
where customer like '%Speed Trail%'
/
( actually when I cut/pasted your sql I noticed the extra ; at the end of the replace)
You could use
update cust_table
set customer =
replace (customer,'Speed Trail',''); <<---
where customer like '%Speed Trail%'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-21-2005 09:29 AM
тАО10-21-2005 09:29 AM
Re: remove word from column
Thanks Patty
- « Previous
-
- 1
- 2
- Next »