<?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: SQL Select on ORACLE in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208334#M96770</link>
    <description>&lt;BR /&gt;Thanks all,&lt;BR /&gt;but if I use:&lt;BR /&gt;&lt;BR /&gt;select field1 || ',' || field2 || ',' || field3 from table;&lt;BR /&gt;&lt;BR /&gt;I got as error:&lt;BR /&gt;&lt;BR /&gt;%SQL-F-UNSNUMXPR, Unsupported numeric expression&lt;BR /&gt;&lt;BR /&gt;What does it mean??</description>
    <pubDate>Tue, 10 Nov 2009 09:53:33 GMT</pubDate>
    <dc:creator>smsc_1</dc:creator>
    <dc:date>2009-11-10T09:53:33Z</dc:date>
    <item>
      <title>SQL Select on ORACLE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208331#M96767</link>
      <description>&lt;BR /&gt;Hello all,&lt;BR /&gt;Hope I can ask in this room.&lt;BR /&gt;I'm driving crazy with the following SQL problem.&lt;BR /&gt;&lt;BR /&gt;I would like to perform a simple select with many fields like:&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; select field1,field2,field3,field4, from table;&lt;BR /&gt;&lt;BR /&gt;Since this is only an example (normally I need at least 20 fields), I would like to separate the result with a symbol like .,- (not matter witch symbol).&lt;BR /&gt;This because for me will be much simple to export on excell.&lt;BR /&gt;&lt;BR /&gt;Is there a way to separate the result with a symbol? &lt;BR /&gt;&lt;BR /&gt;This is what I have on OpenVMS 8.3.1H1&lt;BR /&gt;SQL&amp;gt; sho ver&lt;BR /&gt;Current version of SQL is: Oracle Rdb SQL V7.2-100&lt;BR /&gt;Underlying versions are: &lt;BR /&gt;    Database with filename DB_log&lt;BR /&gt;        Oracle Rdb V7.2-100&lt;BR /&gt;        Rdb/Dispatch V7.2-100 (OpenVMS IA64)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Luca</description>
      <pubDate>Mon, 09 Nov 2009 12:13:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208331#M96767</guid>
      <dc:creator>smsc_1</dc:creator>
      <dc:date>2009-11-09T12:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Select on ORACLE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208332#M96768</link>
      <description>Hi Luca,&lt;BR /&gt;&lt;BR /&gt;have you tried&lt;BR /&gt;&lt;BR /&gt;select field1 || ',' || field2 || ',' || field3 from table;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Mon, 09 Nov 2009 12:50:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208332#M96768</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2009-11-09T12:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Select on ORACLE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208333#M96769</link>
      <description>Under SQLplus you can use SET COLSEP but that's not available in RDB SQL best I can tell.&lt;BR /&gt;&lt;BR /&gt;And while using for example "SET COLSEP ," is a convenient way to quickly generate a CSV file, it is rarely adequate. Notably folks typically want trimmed spaces and double quoted strings to protect against commas within the columns.&lt;BR /&gt;&lt;BR /&gt;So the typical solution often becomes the manual concatenation with a seperator as Duncan outlines. &lt;BR /&gt;You may need a PRINT to get a proper header line.&lt;BR /&gt;&lt;BR /&gt;I suppose you could also play with the EDIT_STRING clause on columns in a view to use ',XXXX'. That'd be tedious.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Personally I'd look into postprocessing the standard fixed-column output with a tool like TPU or PERL for format it just the way I'd like it. It is tedious again and worse, it spreads the knowledge of the query and columns across multiple files, so they could get out of sync.&lt;BR /&gt;Perl has several module to help read/write CSV files. For example:&lt;BR /&gt;&lt;A href="http://search.cpan.org/~tilly/Text-xSV-0.21/lib/Text/xSV.pm" target="_blank"&gt;http://search.cpan.org/~tilly/Text-xSV-0.21/lib/Text/xSV.pm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Nov 2009 14:54:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208333#M96769</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-11-09T14:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Select on ORACLE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208334#M96770</link>
      <description>&lt;BR /&gt;Thanks all,&lt;BR /&gt;but if I use:&lt;BR /&gt;&lt;BR /&gt;select field1 || ',' || field2 || ',' || field3 from table;&lt;BR /&gt;&lt;BR /&gt;I got as error:&lt;BR /&gt;&lt;BR /&gt;%SQL-F-UNSNUMXPR, Unsupported numeric expression&lt;BR /&gt;&lt;BR /&gt;What does it mean??</description>
      <pubDate>Tue, 10 Nov 2009 09:53:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208334#M96770</guid>
      <dc:creator>smsc_1</dc:creator>
      <dc:date>2009-11-10T09:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Select on ORACLE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208335#M96771</link>
      <description>Try&lt;BR /&gt;select field1,  "||" , field2 , "||" ...&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Tue, 10 Nov 2009 09:59:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208335#M96771</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2009-11-10T09:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Select on ORACLE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208336#M96772</link>
      <description>&lt;BR /&gt;select field1, "||" , field2 , "||" ...&lt;BR /&gt;&lt;BR /&gt;Is the solution.... Thanks to all!!!&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Nov 2009 11:43:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208336#M96772</guid>
      <dc:creator>smsc_1</dc:creator>
      <dc:date>2009-11-10T11:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Select on ORACLE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208337#M96773</link>
      <description>&lt;BR /&gt;Closing Thread and assign points!</description>
      <pubDate>Tue, 10 Nov 2009 11:44:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sql-select-on-oracle/m-p/5208337#M96773</guid>
      <dc:creator>smsc_1</dc:creator>
      <dc:date>2009-11-10T11:44:13Z</dc:date>
    </item>
  </channel>
</rss>

