<?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>Question Re: Exported data without LONG VARCHAR/LONG VARBINARY enabled in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/exported-data-without-long-varchar-long-varbinary-enabled/qaa-p/13845637#M4876480</link>
    <description>&lt;P&gt;You can use the builtin &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbreference/exprtype-function.html"&gt;exprtype function&lt;/A&gt; to find out what data type is generated for a particular column in a result set. Starting with v10, you can also use the &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbreference/sa-describe-query-system-procedure.html"&gt;sa_describe_query system procedure&lt;/A&gt; to find out about the data type (and much more) of each column of a result set.&lt;/P&gt;
&lt;P&gt;Note: You will have to mask any single quote within your query as these functions/procedures require the complete statement as a string, so double all single quotes...&lt;/P&gt;
&lt;P&gt;After you have find out what expression returns an undesired data type, you can certainly cast that to a fitting data type, such as&lt;/P&gt;
&lt;PRE class="codehilite"&gt;&lt;CODE&gt;..., CAST(replace((substring(micros.dly_srv_prd_trk_ttl.trk_cnt_62,1,9)),' ','') AS VARCHAR(32767)), ...&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Oct 2014 03:14:11 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2014-10-09T03:14:11Z</dc:date>
    <item>
      <title>Exported data without LONG VARCHAR/LONG VARBINARY enabled</title>
      <link>https://community.sap.com/t5/technology-q-a/exported-data-without-long-varchar-long-varbinary-enabled/qaq-p/13845636</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;
&lt;P&gt;I have one export query has been modified and now it exports in LONG VARCHAR format. Previously it did not and it just fit to the data table length. How can I adjust it back to fit as the data is?&lt;/P&gt;
&lt;P&gt;The message I get during the export is&lt;/P&gt;
&lt;P&gt;"Exported data includes LONG VARCHAR, LONG VARBINARY, and/or JAVA OBJECT columns.
A width of 32768 bytes/characters will be assumed for these columns."&lt;/P&gt;
&lt;P&gt;The below is the script:&lt;/P&gt;
&lt;PRE class="codehilite"&gt;&lt;CODE&gt;SELECT micros.dly_srv_prd_trk_ttl.business_date,'000',
micros.dly_srv_prd_trk_ttl.store_id,
micros.dly_srv_prd_trk_ttl.rvc_seq,
micros.dly_srv_prd_trk_ttl.srv_period_seq,
'Cover Count' AS "Account",
replace((substring(micros.dly_srv_prd_trk_ttl.trk_cnt_62,1,9)),'         ','')
FROM micros.dly_srv_prd_trk_ttl

where cast((getDate()-1) As Date) = cast(micros.dly_srv_prd_trk_ttl.business_date As Date)

ORDER BY rvc_seq;

OUTPUT TO d:\\micros\\HBF\\Stat.csv FORMAT FIXED


&lt;P&gt;However if I go to DBISQL and output the specific function:
    &lt;STRONG&gt;replace((substring(micros.dly_srv_prd_trk_ttl.trk_cnt_62,1,9)),'         ','')&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;It is exporting in a nice way where the data size is fit to the number instead of 32768 characters.&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;
&lt;P&gt;Regards,
Christian&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Oct 2014 00:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exported-data-without-long-varchar-long-varbinary-enabled/qaq-p/13845636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-09T00:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Exported data without LONG VARCHAR/LONG VARBINARY enabled</title>
      <link>https://community.sap.com/t5/technology-q-a/exported-data-without-long-varchar-long-varbinary-enabled/qaa-p/13845637#M4876480</link>
      <description>&lt;P&gt;You can use the builtin &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbreference/exprtype-function.html"&gt;exprtype function&lt;/A&gt; to find out what data type is generated for a particular column in a result set. Starting with v10, you can also use the &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbreference/sa-describe-query-system-procedure.html"&gt;sa_describe_query system procedure&lt;/A&gt; to find out about the data type (and much more) of each column of a result set.&lt;/P&gt;
&lt;P&gt;Note: You will have to mask any single quote within your query as these functions/procedures require the complete statement as a string, so double all single quotes...&lt;/P&gt;
&lt;P&gt;After you have find out what expression returns an undesired data type, you can certainly cast that to a fitting data type, such as&lt;/P&gt;
&lt;PRE class="codehilite"&gt;&lt;CODE&gt;..., CAST(replace((substring(micros.dly_srv_prd_trk_ttl.trk_cnt_62,1,9)),' ','') AS VARCHAR(32767)), ...&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Oct 2014 03:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exported-data-without-long-varchar-long-varbinary-enabled/qaa-p/13845637#M4876480</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2014-10-09T03:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Exported data without LONG VARCHAR/LONG VARBINARY enabled</title>
      <link>https://community.sap.com/t5/technology-q-a/exported-data-without-long-varchar-long-varbinary-enabled/qaa-p/13845638#M4876481</link>
      <description>&lt;P&gt;Thanks Volker Barth, you're genius. I'd tried Cast function to restrict the data output type to desired number, it's working now.&lt;/P&gt;
&lt;P&gt;Thank you again!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 03:37:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exported-data-without-long-varchar-long-varbinary-enabled/qaa-p/13845638#M4876481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-09T03:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Exported data without LONG VARCHAR/LONG VARBINARY enabled</title>
      <link>https://community.sap.com/t5/technology-q-a/exported-data-without-long-varchar-long-varbinary-enabled/qaa-p/13845639#M4876482</link>
      <description>&lt;P&gt;Well, I think the thanks should not go to me but to the SQL Anywhere team for making helpful functions like exprtype() available:) - Glad you got it working.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 03:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exported-data-without-long-varchar-long-varbinary-enabled/qaa-p/13845639#M4876482</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2014-10-09T03:45:12Z</dc:date>
    </item>
  </channel>
</rss>

