<?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: Accessing Teradata table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939993#M369022</link>
    <description>&lt;P&gt;Hi SASKiwi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your suggestion worked!&amp;nbsp; Here is my full code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;libname MyTera4 teradata user='xxxx@LDAP' password=xxxxx&lt;BR /&gt;server="tdprod.nscorp.com" connection=global database=REVENUE_PVIEW SCHEMA=REVENUE_PVIEW;&lt;BR /&gt;proc sql;&lt;BR /&gt;select *&amp;nbsp;&lt;BR /&gt;from MyTera4.CARLOAD&lt;BR /&gt;WHERE WB_SN_URRWIN = '1037498014';&lt;BR /&gt;QUIT;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Note - I am naming the schema same as database.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Thank you very much!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2024 20:19:18 GMT</pubDate>
    <dc:creator>hkassamNS</dc:creator>
    <dc:date>2024-08-19T20:19:18Z</dc:date>
    <item>
      <title>Accessing Teradata table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939660#M368926</link>
      <description>&lt;P&gt;I am trying to access a table member in a teradata library.&amp;nbsp; Although the library "MyTera2" is successfully assigned I am getting an error message when running proc sql.&amp;nbsp; Something to do with the period not recognized.&amp;nbsp; The Carload table is a member within the Revenue_pview library.&amp;nbsp; Please see below.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;proc sql;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Select *&lt;BR /&gt;&amp;nbsp; &amp;nbsp;FROM MyTera2.REVENUE_PVIEW.CARLOAD CL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, ',', ANSIMISS, AS, CROSS, EXCEPT, FULL, GROUP, HAVING,&lt;BR /&gt;INNER, INTERSECT, JOIN, LEFT, NATURAL, NOMISS, ORDER, OUTER, RIGHT, UNION, WHERE.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 16:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939660#M368926</guid>
      <dc:creator>hkassamNS</dc:creator>
      <dc:date>2024-08-16T16:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Teradata table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939664#M368928</link>
      <description>&lt;P&gt;To clarify, the error message indicates that the period between pview and carload is not a recognized symbol.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 17:25:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939664#M368928</guid>
      <dc:creator>hkassamNS</dc:creator>
      <dc:date>2024-08-16T17:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Teradata table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939665#M368929</link>
      <description>&lt;P&gt;SAS dataset names use only two levels.&amp;nbsp; The LIBREF (which is optional and will default to WORK, or in rare cases USER or some other libref you set with the USER system option) and the MEMNAME.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A MEMNAME cannot contain a period.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So assuming the libref MYTERA2 was defined to point to the schema/database&amp;nbsp; named&amp;nbsp;REVENUE_PVIEW on your Teradata server then your code should be:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FROM MyTera2.CARLOAD CL&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If for some reason you are trying to access a dataset from a different schema/database than the one you pointed the libref towards then you can use the SCHEMA= dataset option to set it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FROM MyTera2.CARLOAD(schema="REVENUE_PVIEW") CL&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Aug 2024 17:29:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939665#M368929</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-08-16T17:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Teradata table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939688#M368936</link>
      <description>&lt;P&gt;Hi Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my libname statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;libname MyTera2 teradata user='xxxx@LDAP' password=XXXXXXXX&lt;BR /&gt;&amp;nbsp; &amp;nbsp;server="tdprod.nscorp.com" connection=global;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;NOTE: Libref MYTERA2 was successfully assigned as follows:&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Engine: TERADATA&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Physical Name: tdprod.nscorp.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Under MYTERA2 there are a number of databases - one of them is REVENUE_PVIEW.&amp;nbsp; CARLOAD is a table within REVENUE_PVIEW.&amp;nbsp; The servers tree looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; MyTERA2 &amp;gt;&amp;gt; REVENUE_PVIEW &amp;gt;&amp;gt; CARLOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried both methods:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method 1:&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc sql;&lt;BR /&gt;&amp;nbsp; select *&lt;BR /&gt;&amp;nbsp; from MyTera2.CARLOAD;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; WHERE WB_SN_URRWIN = '1037498014';&lt;BR /&gt;&amp;nbsp; QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ERROR: File MYTERA2.CARLOAD.DATA does not exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Method 2:&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc sql;&lt;BR /&gt;&amp;nbsp; select *&lt;BR /&gt;&amp;nbsp; from MyTera2.CARLOAD(schema=REVENUE_PVIEW);&lt;BR /&gt;&amp;nbsp; WHERE WB_SN_URRWIN = '1037498014';&lt;BR /&gt;&amp;nbsp; QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This doesn't work either - the system becomes unresponsive and I have to shut down SAS in Task Manager.&lt;/P&gt;&lt;P&gt;Maybe there is an option somewhere which will allow pointing to the 3rd level member in the server?&amp;nbsp; &amp;nbsp; Any further suggestions will be most welcome.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 18:47:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939688#M368936</guid>
      <dc:creator>hkassamNS</dc:creator>
      <dc:date>2024-08-16T18:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Teradata table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939713#M368941</link>
      <description>&lt;P&gt;Typically SAS LIBNAME statements used to access relational databases, need to point to schemas if you are using SAS SQL. Try modifying your LIBNAME like so:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname MyTera2 teradata user='xxxx@LDAP' password=XXXXXXXX
   server="tdprod.nscorp.com" connection=global database = 'REVENUE_PVIEW';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You may also need SCHEMA = but you will need to figure the value for yourself.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2024 00:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939713#M368941</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-08-17T00:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Teradata table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939721#M368944</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/468181"&gt;@hkassamNS&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the response.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is my libname statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;libname MyTera2 teradata user='xxxx@LDAP' password=XXXXXXXX&lt;BR /&gt;&amp;nbsp; &amp;nbsp;server="tdprod.nscorp.com" connection=global;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;NOTE: Libref MYTERA2 was successfully assigned as follows:&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Engine: TERADATA&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Physical Name: tdprod.nscorp.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Under MYTERA2 there are a number of databases - one of them is REVENUE_PVIEW.&amp;nbsp; CARLOAD is a table within REVENUE_PVIEW.&amp;nbsp; The servers tree looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; MyTERA2 &amp;gt;&amp;gt; REVENUE_PVIEW &amp;gt;&amp;gt; CARLOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried both methods:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 1:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; proc sql;&lt;BR /&gt;&amp;nbsp; select *&lt;BR /&gt;&amp;nbsp; from MyTera2.CARLOAD;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; WHERE WB_SN_URRWIN = '1037498014';&lt;BR /&gt;&amp;nbsp; QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ERROR: File MYTERA2.CARLOAD.DATA does not exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Method 2:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; proc sql;&lt;BR /&gt;&amp;nbsp; select *&lt;BR /&gt;&amp;nbsp; from MyTera2.CARLOAD(schema=REVENUE_PVIEW);&lt;BR /&gt;&amp;nbsp; WHERE WB_SN_URRWIN = '1037498014';&lt;BR /&gt;&amp;nbsp; QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This doesn't work either - the system becomes unresponsive and I have to shut down SAS in Task Manager.&lt;/P&gt;
&lt;P&gt;Maybe there is an option somewhere which will allow pointing to the 3rd level member in the server?&amp;nbsp; &amp;nbsp; Any further suggestions will be most welcome.&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;My guess is that the second option did work, but since most people who pay for Teradata do it because they have HUGE data to store you did not wait long enough for you attempt to copy ALL of the data from the Teradata server to the SAS server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try running something that will not return so much data.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2024 03:57:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939721#M368944</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-08-17T03:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Teradata table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939993#M369022</link>
      <description>&lt;P&gt;Hi SASKiwi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your suggestion worked!&amp;nbsp; Here is my full code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;libname MyTera4 teradata user='xxxx@LDAP' password=xxxxx&lt;BR /&gt;server="tdprod.nscorp.com" connection=global database=REVENUE_PVIEW SCHEMA=REVENUE_PVIEW;&lt;BR /&gt;proc sql;&lt;BR /&gt;select *&amp;nbsp;&lt;BR /&gt;from MyTera4.CARLOAD&lt;BR /&gt;WHERE WB_SN_URRWIN = '1037498014';&lt;BR /&gt;QUIT;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Note - I am naming the schema same as database.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Thank you very much!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 20:19:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-Teradata-table/m-p/939993#M369022</guid>
      <dc:creator>hkassamNS</dc:creator>
      <dc:date>2024-08-19T20:19:18Z</dc:date>
    </item>
  </channel>
</rss>

