<?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: Reading BIGINT data from teradata in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185004#M14188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for the details Tom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, the column is an identifier for customer so I will try out the option for converting to character while extracting into SAS and reconverting it into numeric and storing in sas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Apr 2014 16:50:26 GMT</pubDate>
    <dc:creator>Sheeba</dc:creator>
    <dc:date>2014-04-21T16:50:26Z</dc:date>
    <item>
      <title>Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185000#M14184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to read a column with BIGINT datatype from teradata . I am getting the following note&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: At least one of the columns in this DBMS table has &lt;/P&gt;&lt;P&gt;a datatype that is not supported by this engine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to resolve this error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sheeba Swaminathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 02:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185000#M14184</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2014-04-18T02:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185001#M14185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check and understand the datatypes as first step. See the notes about precision on floating numbers with SAS.&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0v7nh4ylrihtin1te8xl0q3dvzv.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0v7nh4ylrihtin1te8xl0q3dvzv.htm"&gt;SAS/ACCESS(R) 9.3 for Relational Databases: Reference, Second Edition&lt;/A&gt;&amp;nbsp; (Teradata) &lt;/P&gt;&lt;P&gt;By that it is not making sense transforming bigint to float as it can harm you by losing numbers.&lt;/P&gt;&lt;P&gt;You can transform the Bigint type in a character approach&amp;nbsp; as other databases numbers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is thinking number is:&lt;/P&gt;&lt;P&gt;- float with SAS and many others and numbers&lt;/P&gt;&lt;P&gt;- in databases many times it are reality constraints to a limited range of characters.&lt;/P&gt;&lt;P&gt;(some exceptions like packed...)&lt;/P&gt;&lt;P&gt;Some Hollerith age inheritance is causing some confusing by many of us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I you have 9.3 (DS2 experimental) / 9.4 (DS2 operational) you could look at using DS2. &lt;A href="http://support.sas.com/documentation/cdl/en/ds2ref/66664/HTML/default/viewer.htm#n0v130wmh3hmuzn1t7y5y4pgxa69.htm" title="http://support.sas.com/documentation/cdl/en/ds2ref/66664/HTML/default/viewer.htm#n0v130wmh3hmuzn1t7y5y4pgxa69.htm"&gt;SAS(R) 9.4 DS2 Language Reference, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As that one is supporting those other datatypes being used at DBMS systems&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 06:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185001#M14185</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-04-18T06:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185002#M14186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've encountered this issue with Sybase IQ. It's not an easy one to resolve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, what is the nature of your BIGINT column? Is it something where losing four digits at the right will cause a problem? If not, just CAST it to a floating point column, and treat it normally in SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could check to see if any of the contents exceed the maximum integer value that can be processed by SAS. If not, you won't lose any precision, and you're good to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the contents isn't intended to be treated as a number (for example a customer ID or something similar), instead you can convert it to a character variable of the appropriate length, and then treat it normally in SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you genuinely do need to treat it as a nineteen-digit number in SAS, that will be very tricky. Perhaps there's a way to use DS2 to do this, but I don't have any experience in that area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 14:04:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185002#M14186</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-04-18T14:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185003#M14187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for the details Jaap. I will check out the DS2 option &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 16:46:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185003#M14187</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2014-04-21T16:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185004#M14188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for the details Tom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, the column is an identifier for customer so I will try out the option for converting to character while extracting into SAS and reconverting it into numeric and storing in sas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 16:50:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185004#M14188</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2014-04-21T16:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185005#M14189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest you don't convert it to numeric in SAS. Just use it as a character field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 18:36:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185005#M14189</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-04-21T18:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185006#M14190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok...but due to some constraints, I am not supposed to alter the column data type. That's the reason why I decided to convert back.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 17:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185006#M14190</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2014-04-22T17:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185007#M14191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sheeba when you try to convert bigint to SAS numeric you are going to lose precision as numeric in SAS =floating= that is an implied dataconversion with limitations.&lt;/P&gt;&lt;P&gt;When you replace the bigint type with the char-type you are not changing anything as the identifier of a customer is not meant to do calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to do calculating a mean and variance on those identifier numbers is meaningless.&lt;/P&gt;&lt;P&gt;Would you use Sepa banking-accountnumbers you cannot use bigint as that contain characters (in some countries).&lt;/P&gt;&lt;P&gt;This type of smart compression using numbers within technology is coming of the old hollerith age. I am sorry for that. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 17:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185007#M14191</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-04-22T17:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185008#M14192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Sheeba; succinctly, DON'T DO IT!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You simply can't reliably convert a number bigger than 15 digits into the SAS numeric format. You will absolutely, definitely, lose accuracy on some of the numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give this code a spin:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;length CharNum $16;&lt;/P&gt;&lt;P&gt;input CharNum;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;9876543210987654&lt;/P&gt;&lt;P&gt;9876543210987653&lt;/P&gt;&lt;P&gt;9876543210987652&lt;/P&gt;&lt;P&gt;9876543210987651&lt;/P&gt;&lt;P&gt;9876543210987650&lt;/P&gt;&lt;P&gt;9876543210987659&lt;/P&gt;&lt;P&gt;9876543210987658&lt;/P&gt;&lt;P&gt;9876543210987657&lt;/P&gt;&lt;P&gt;9876543210987656&lt;/P&gt;&lt;P&gt;9876543210987655&lt;/P&gt;&lt;P&gt;9876543210987654&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print; run;&lt;/P&gt;&lt;P&gt;data convert1;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;NumericNum = input(CharNum, 16.);&lt;/P&gt;&lt;P&gt;format NumericNum z16.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print; run;&lt;/P&gt;&lt;P&gt;data convert2;&lt;/P&gt;&lt;P&gt;set convert1;&lt;/P&gt;&lt;P&gt;ConvertedCharNum = put(NumericNum, z16.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. the only option is to explore bigint in DS2, which I haven't done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 18:44:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185008#M14192</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-04-22T18:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185009#M14193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jaap. I will try to get familiarized with DS2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 22:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185009#M14193</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2014-04-23T22:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185010#M14194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the details Tom. I will explore DS2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 22:52:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185010#M14194</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2014-04-23T22:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185011#M14195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then tell the creator of the database to convert their customer id field to a character field.&amp;nbsp; There is no reason to use a number for a field that will never be used in mathematical operations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 23:08:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185011#M14195</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-04-23T23:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185012#M14196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="808902" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You need to be on SAS9.4 in order to use DS2. It would allow you to deal directly with a data type of BIGINT but you still wouldn't be able to store this bigint as a numeric variable in a SAS file without loosing precision. DS2 gets its full power by in-database processing - but in order to do this the SAS in-database code accelerator must be installed on the Teradata side: &lt;A class="active_link" href="https://support.sas.com/documentation/cdl/en/ds2ref/66664/HTML/default/viewer.htm#n1tgm4pqck3ms7n16uzwn3qj1s0v.htm" title="https://support.sas.com/documentation/cdl/en/ds2ref/66664/HTML/default/viewer.htm#n1tgm4pqck3ms7n16uzwn3qj1s0v.htm"&gt;SAS(R) 9.4 DS2 Language Reference, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As others already suggested: If you need to pull your data into SAS then I believe the only way to deal with this BIGINT is to cast it to a character. If you're using implicit pass-through then you could try and use the DBSASTYPE dataset option &lt;A href="https://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0v4ma1zb9lu99n1728j279rjcqi.htm" title="https://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0v4ma1zb9lu99n1728j279rjcqi.htm"&gt;SAS/ACCESS(R) 9.3 for Relational Databases: Reference, Second Edition&lt;/A&gt; and leave the conversion to the SAS/Access engine.&lt;/P&gt;&lt;P&gt;I've never done this for BIGINT so you would need to try if this works (let us know the outcome if you do so).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"due to some constraints, I am not supposed to alter the column data type"&lt;/P&gt;&lt;P&gt;I can understand this principle but as there is no 1:1 match of data types between Teradata and SAS and you have a very valid reason why you must change the type, I believe this principle doesn't apply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 23:57:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185012#M14196</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-04-23T23:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185013#M14197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I second this! You will have problems not only with SAS, but with any other facilities that don't support an 8 byte INT datatype. It should be stored as character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 00:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185013#M14197</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-04-24T00:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185014#M14198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tnx Patrick.... I will look for casting into character&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 21:05:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185014#M14198</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2014-04-24T21:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185015#M14199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tnx Tom. I will definitely look forward for that option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 21:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185015#M14199</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2014-04-24T21:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185016#M14200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have figured another way for reading the bigint column from Teradata. It is possible to cast the column as decimal while making passthrough. Then it is required to merge the temporary table(output of passthrough ) to the original table which requires column addition..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sheeba Swaminathan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 17:58:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185016#M14200</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2014-04-28T17:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185017#M14201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This issue is a big concern because we are migrating our SOR Oracle to Teradata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BIGINT problem occurs when you try to put the data into a SAS dataset, because SAS does not support BIGINT data.&amp;nbsp; SAS will complain that it is not a supported data type, and will remove the column(s) from the dataset or the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the libname access method, then you should be able to use the "cast=yes" option on your libname or dataset or your DIS table.&amp;nbsp; That feature is currently broken&amp;nbsp; in out 9.4 version, but theoretically it should work.&amp;nbsp; The documentation for cast=yes is in the SAS/Access user guide, and yes, they convert it to float.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using pass-through SQL, you have no automatic options for handling BIGINT data.&amp;nbsp; The casting to character(20) takes up 2.5 times space, and one of our tables has 27 BIGINT columns.&amp;nbsp; In Teradata, if you cast your data to DECIMAL(15) -- which is recommended in Teradata documents -- then you will get a Teradata error if the data does not fit.&amp;nbsp; The error is a good thing, since it prevents you from producing inaccurate results.&amp;nbsp; SAS turns that BIGINT data into a number with 16. format, which is OK if you have a host that can represent 15 digits plus a sign.&amp;nbsp; Our Solaris 64-bit OS can represent the number, but you should verify that your host can represent that data.&amp;nbsp; In any case, you can create a test to be sure that 15 digits are represented.&amp;nbsp; I saw one test posted, but here's what I would do:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a Teradata table with numbers from 999999999990000 to 999999999999999&lt;/LI&gt;&lt;LI&gt;Cast each number both as char(20) and as decimal(15)&lt;/LI&gt;&lt;LI&gt;Create a dataset of this Teradata data in SAS by using pass-through SQL.&lt;/LI&gt;&lt;LI&gt;Count the distinct occurrences of each column in the table.&lt;/LI&gt;&lt;LI&gt;The counts should be exactly equal if you can represent 15 digits of data.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone passed SAS macros or functions to Teradata, so that you can use them in pass-through SQL?&amp;nbsp; It would be grand to have %bigint(foo) return a result like "(cast foo as decimal(15)) as foo".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concerning the comment on DS2:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;DS2 exists in SAS 9.3, but it became official in SAS 9.4.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;I tried it out, and it produced some results in SAS 9.3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 18:36:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185017#M14201</guid>
      <dc:creator>RedPlanet</dc:creator>
      <dc:date>2014-12-02T18:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reading BIGINT data from teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185018#M14202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There should be no problem using SAS macros to generate Teradata passthru SQL. This happens within SAS though and the end result is valid SQL which is passed on to Teradata. I use the approach with SQL Server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2014 18:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-BIGINT-data-from-teradata/m-p/185018#M14202</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-12-03T18:54:36Z</dc:date>
    </item>
  </channel>
</rss>

