<?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: select statement for specific pattern in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989482#M780993</link>
    <description>I suggest, there is a routine in Oracle, which gives number of words in record.&lt;BR /&gt;&lt;BR /&gt;HTH</description>
    <pubDate>Fri, 07 Jul 2006 12:34:59 GMT</pubDate>
    <dc:creator>Victor Fridyev</dc:creator>
    <dc:date>2006-07-07T12:34:59Z</dc:date>
    <item>
      <title>select statement for specific pattern</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989479#M780990</link>
      <description>I have a column that I need to select on:&lt;BR /&gt;Data looks like:&lt;BR /&gt;01 002 120&lt;BR /&gt;01 002 160&lt;BR /&gt;01 005 120&lt;BR /&gt;01 002 125&lt;BR /&gt;01 1 00 02 1&lt;BR /&gt;01 2 00 02 3&lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;I need to only pull this type of format:&lt;BR /&gt;01 002 120&lt;BR /&gt;&lt;BR /&gt;Next question:&lt;BR /&gt;How to update, this type of format:&lt;BR /&gt;01 002 120&lt;BR /&gt;&lt;BR /&gt;To this type of format:&lt;BR /&gt;01 2 00 02 3&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Jul 2006 11:32:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989479#M780990</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2006-07-07T11:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: select statement for specific pattern</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989480#M780991</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;It's not fully clear, but you if format means 3 fields and 5 fields, so:&lt;BR /&gt;&lt;BR /&gt;awk 'NF==5 {print; next}&lt;BR /&gt;NF==3 {do_what_you_need; next}' input_file &amp;gt; output_file&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Fri, 07 Jul 2006 12:13:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989480#M780991</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2006-07-07T12:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: select statement for specific pattern</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989481#M780992</link>
      <description>How can I use this with Oracle select statememt.&lt;BR /&gt;&lt;BR /&gt;Bascially the format that I need to find is&lt;BR /&gt;Where col like ....&lt;BR /&gt;99 999 999&lt;BR /&gt;## ### ###&lt;BR /&gt;&lt;BR /&gt;Not an awk statement</description>
      <pubDate>Fri, 07 Jul 2006 12:21:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989481#M780992</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2006-07-07T12:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: select statement for specific pattern</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989482#M780993</link>
      <description>I suggest, there is a routine in Oracle, which gives number of words in record.&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Fri, 07 Jul 2006 12:34:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989482#M780993</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2006-07-07T12:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: select statement for specific pattern</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989483#M780994</link>
      <description>imho...the requirement is quite confusing. On one hand you are trying to compare values in a flat file to what's stored inside the Oracle database, while at the same time expanding all the 3-field records to 5-fields. Not sure here? Please clarify further.&lt;BR /&gt;&lt;BR /&gt;Here's what you need to do to convert all 3-field records to 5-field records:&lt;BR /&gt;&lt;BR /&gt;# sed 's/^\(..\) \(.\)\(..\) \(.\)\(..\)$/\1 \2 \3 0\4 \5/p' inputfile</description>
      <pubDate>Fri, 07 Jul 2006 13:16:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989483#M780994</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-07-07T13:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: select statement for specific pattern</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989484#M780995</link>
      <description>Sorry lets try this again.&lt;BR /&gt;I need to run a select statement on a table in Oracle.&lt;BR /&gt;&lt;BR /&gt; have a column that I need to select on: &lt;BR /&gt;Data looks like: &lt;BR /&gt;01 002 120 &lt;BR /&gt;01 002 160 &lt;BR /&gt;01 005 120 &lt;BR /&gt;01 002 125 &lt;BR /&gt;01 1 00 02 1 &lt;BR /&gt;01 2 00 02 3 &lt;BR /&gt;01 2 03 02 3 &lt;BR /&gt;01 042 160 &lt;BR /&gt;01 2 06 02 3 &lt;BR /&gt;01 202 167 &lt;BR /&gt;etc. &lt;BR /&gt;&lt;BR /&gt;I need to only pull this type of format: &lt;BR /&gt;## ### ### &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;select col1 from table where col1 like?? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Next question: &lt;BR /&gt;How to update, this type of format: &lt;BR /&gt;## ### ### &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To this type of format: &lt;BR /&gt;## # ## ## # &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Jul 2006 13:20:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989484#M780995</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2006-07-07T13:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: select statement for specific pattern</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989485#M780996</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Here's a select statement that accomplishes what you're looking for (notice the use of the substr() function):&lt;BR /&gt;&lt;BR /&gt;select id "id",substr(id,1,2)||' '||substr(id,4,1)||' '||&lt;BR /&gt;substr(id,5,2)||' '||substr(id,8,2)||' '||substr(id,10,1) "formatted id"&lt;BR /&gt;from tab01&lt;BR /&gt;where id like '__ ___ ___'&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;You might consider selecting into another table instead of updating rows in the existing table.&lt;BR /&gt;&lt;BR /&gt;A link to the Oracle 9i SQL reference:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96540/toc.htm" target="_blank"&gt;http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96540/toc.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Fri, 07 Jul 2006 13:28:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989485#M780996</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-07-07T13:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: select statement for specific pattern</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989486#M780997</link>
      <description>If you're using 10g, consider using Oracle Regular Expressions.</description>
      <pubDate>Fri, 07 Jul 2006 13:32:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989486#M780997</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-07-07T13:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: select statement for specific pattern</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989487#M780998</link>
      <description>The substring worked purfect!!!</description>
      <pubDate>Tue, 11 Jul 2006 11:59:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-statement-for-specific-pattern/m-p/4989487#M780998</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2006-07-11T11:59:01Z</dc:date>
    </item>
  </channel>
</rss>

