<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: remove word from column in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935430#M805004</link>
    <description>With perl you can do-&lt;BR /&gt;perl -p -e 's/\(?speed test\)?//' &lt;INPUTFILE&gt;outfile&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills&lt;/INPUTFILE&gt;</description>
    <pubDate>Thu, 20 Oct 2005 15:18:08 GMT</pubDate>
    <dc:creator>Rodney Hills</dc:creator>
    <dc:date>2005-10-20T15:18:08Z</dc:date>
    <item>
      <title>remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935429#M805003</link>
      <description>I did an opps and ran the update on the wrong database.&lt;BR /&gt;Now I need to remove:&lt;BR /&gt;speed test&lt;BR /&gt;or&lt;BR /&gt;(speed test)&lt;BR /&gt;from the address column&lt;BR /&gt;&lt;BR /&gt;SO I need to keep the actual address but remove what I said above.</description>
      <pubDate>Thu, 20 Oct 2005 15:11:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935429#M805003</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2005-10-20T15:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935430#M805004</link>
      <description>With perl you can do-&lt;BR /&gt;perl -p -e 's/\(?speed test\)?//' &lt;INPUTFILE&gt;outfile&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills&lt;/INPUTFILE&gt;</description>
      <pubDate>Thu, 20 Oct 2005 15:18:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935430#M805004</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-10-20T15:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935431#M805005</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Can be done with SED as well.&lt;BR /&gt;&lt;BR /&gt;#sed -e 's/speed test//g' file_name &amp;gt; new_file&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam</description>
      <pubDate>Thu, 20 Oct 2005 15:28:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935431#M805005</guid>
      <dc:creator>Ranjith_5</dc:creator>
      <dc:date>2005-10-20T15:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935432#M805006</link>
      <description>I need to do this in oracle</description>
      <pubDate>Thu, 20 Oct 2005 15:33:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935432#M805006</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2005-10-20T15:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935433#M805007</link>
      <description>you mean oracle table?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam</description>
      <pubDate>Thu, 20 Oct 2005 15:58:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935433#M805007</guid>
      <dc:creator>Ranjith_5</dc:creator>
      <dc:date>2005-10-20T15:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935434#M805008</link>
      <description>Have you committed the changes ? What SQL statement did u use to insert the value "speed test" ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam</description>
      <pubDate>Thu, 20 Oct 2005 16:16:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935434#M805008</guid>
      <dc:creator>Ranjith_5</dc:creator>
      <dc:date>2005-10-20T16:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935435#M805009</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I dont know aht is your table structure and what command you have used to change the address. Any way you can try something like following to rollback to the previous case. If you havent committed the changes nothing to worry. Use rool back command to undo the changes.&lt;BR /&gt;&lt;BR /&gt;update &lt;TABLE-NAME&gt;  set &lt;LOCATION-NAME&gt;='name of location' where &lt;LOCATION-NAME&gt;='speed test';&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam&lt;BR /&gt;&lt;/LOCATION-NAME&gt;&lt;/LOCATION-NAME&gt;&lt;/TABLE-NAME&gt;</description>
      <pubDate>Thu, 20 Oct 2005 16:22:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935435#M805009</guid>
      <dc:creator>Ranjith_5</dc:creator>
      <dc:date>2005-10-20T16:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935436#M805010</link>
      <description>Maybe I should be more clear&lt;BR /&gt;&lt;BR /&gt;The speed test was appended to the address, so it is the address with speed test right after it.</description>
      <pubDate>Thu, 20 Oct 2005 18:20:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935436#M805010</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2005-10-20T18:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935437#M805011</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;here is update query to solve ur problem&lt;BR /&gt;&lt;BR /&gt;UPDATE tablename SET columnname= SUBSTR(columnname,1,INSTR(columnname,'speed test',1,1)-1)&lt;BR /&gt;&lt;BR /&gt;This is will remove the 'speed test' string at the end of ur address part&lt;BR /&gt;&lt;BR /&gt;for eg.  if address is like&lt;BR /&gt;&lt;BR /&gt;'some address speed test' this query will update that as 'some address'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Oct 2005 00:18:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935437#M805011</guid>
      <dc:creator>Rajesh_83</dc:creator>
      <dc:date>2005-10-21T00:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935438#M805012</link>
      <description>you can also use.&lt;BR /&gt;&lt;BR /&gt; update table_name set address_column = replace(address_column,'speed test','');&lt;BR /&gt;&lt;BR /&gt;You are replaceing your string with a zero byte character.  &lt;BR /&gt;This will work regardless of where in the address column your value is.&lt;BR /&gt;&lt;BR /&gt;Patti</description>
      <pubDate>Fri, 21 Oct 2005 10:44:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935438#M805012</guid>
      <dc:creator>Patti Johnson</dc:creator>
      <dc:date>2005-10-21T10:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935439#M805014</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Complementing Patty answer, you should see what you are going to update before (I strongly recomend it) doing it:&lt;BR /&gt;&lt;BR /&gt;select address_column, replace( address_column,'speed test',null) address_column_replaced&lt;BR /&gt;from table_name &lt;BR /&gt;where address_column != replace( address_column,'speed test',null);&lt;BR /&gt;&lt;BR /&gt;And after above query results were verified, do the update: &lt;BR /&gt;&lt;BR /&gt;update table_name &lt;BR /&gt;set address_column = replace( address_column,'speed test',null)&lt;BR /&gt;where address_column != replace( address_column,'speed test',null);&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;&lt;BR /&gt;Eric Antunes&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Oct 2005 11:05:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935439#M805014</guid>
      <dc:creator>Eric Antunes</dc:creator>
      <dc:date>2005-10-21T11:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935440#M805016</link>
      <description>Correction: &lt;BR /&gt;&lt;BR /&gt;Complementing Patti's answer...</description>
      <pubDate>Fri, 21 Oct 2005 11:06:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935440#M805016</guid>
      <dc:creator>Eric Antunes</dc:creator>
      <dc:date>2005-10-21T11:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935441#M805019</link>
      <description>I am trying to get a script to work.&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;cat test3|while read i&lt;BR /&gt;do echo $i&lt;BR /&gt;sqlplus -s admin/admin &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;update cust_table&lt;BR /&gt;set customer = replace (customer,'Speed Trail','');&lt;BR /&gt;where tn = ($i);&lt;BR /&gt;commit;&lt;BR /&gt;quit&lt;BR /&gt;&lt;BR /&gt;EOF&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Oct 2005 11:54:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935441#M805019</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2005-10-21T11:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935442#M805020</link>
      <description>What is the error that you are getting?&lt;BR /&gt;Also is tn a number?  If not you will need to use quotes around '$i'.&lt;BR /&gt;&lt;BR /&gt;You could use &lt;BR /&gt;update cust_table&lt;BR /&gt;set customer = &lt;BR /&gt;replace (customer,'Speed Trail','')&lt;BR /&gt;where customer like '%Speed Trail%'&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;( actually when I cut/pasted your sql I noticed the extra ; at the end of the replace)&lt;BR /&gt;&lt;BR /&gt;You could use &lt;BR /&gt;update cust_table&lt;BR /&gt;set customer = &lt;BR /&gt;replace (customer,'Speed Trail','');  &amp;lt;&amp;lt;---&lt;BR /&gt;where customer like '%Speed Trail%'&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Oct 2005 12:17:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935442#M805020</guid>
      <dc:creator>Patti Johnson</dc:creator>
      <dc:date>2005-10-21T12:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: remove word from column</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935443#M805024</link>
      <description>Greatly appreciated!!&lt;BR /&gt;Thanks Patty</description>
      <pubDate>Fri, 21 Oct 2005 16:29:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-word-from-column/m-p/4935443#M805024</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2005-10-21T16:29:10Z</dc:date>
    </item>
  </channel>
</rss>

