<?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 Datetime()  update and insert error in teradata in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189729#M47907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to update a field value with current date and time in teradata table.&lt;/P&gt;&lt;P&gt;I am using&lt;/P&gt;&lt;P&gt;Update library.table_name set column = datetime() ;&lt;/P&gt;&lt;P&gt;Inside proc sql.&lt;/P&gt;&lt;P&gt;It is showing me error, cursor pointer in teradata mode is not allowed.&lt;/P&gt;&lt;P&gt;When I'm trying to update current time by pass through statements in teradata using,&lt;/P&gt;&lt;P&gt;Connect to teradata ( credentials) ;&lt;/P&gt;&lt;P&gt;Select * from Conn to teradata ;&lt;/P&gt;&lt;P&gt;(&lt;SPAN style="font-size: 33px;"&gt;Update schema.table_name set column = current_timestamp(0)) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then it's working fine but showing in logs that no rows were selected.&lt;/P&gt;&lt;P&gt;I only can select the tables I. E. View the tables by passing through but neither can update nor can insert or create table by passing through&lt;/P&gt;&lt;P&gt;I simply cannot understand.&lt;/P&gt;&lt;P&gt;Kindly let me know a solution and an explanation why this is happening if anyone else has encountered the same problem ever.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Nov 2014 17:55:12 GMT</pubDate>
    <dc:creator>Hercules</dc:creator>
    <dc:date>2014-11-27T17:55:12Z</dc:date>
    <item>
      <title>Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189729#M47907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to update a field value with current date and time in teradata table.&lt;/P&gt;&lt;P&gt;I am using&lt;/P&gt;&lt;P&gt;Update library.table_name set column = datetime() ;&lt;/P&gt;&lt;P&gt;Inside proc sql.&lt;/P&gt;&lt;P&gt;It is showing me error, cursor pointer in teradata mode is not allowed.&lt;/P&gt;&lt;P&gt;When I'm trying to update current time by pass through statements in teradata using,&lt;/P&gt;&lt;P&gt;Connect to teradata ( credentials) ;&lt;/P&gt;&lt;P&gt;Select * from Conn to teradata ;&lt;/P&gt;&lt;P&gt;(&lt;SPAN style="font-size: 33px;"&gt;Update schema.table_name set column = current_timestamp(0)) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then it's working fine but showing in logs that no rows were selected.&lt;/P&gt;&lt;P&gt;I only can select the tables I. E. View the tables by passing through but neither can update nor can insert or create table by passing through&lt;/P&gt;&lt;P&gt;I simply cannot understand.&lt;/P&gt;&lt;P&gt;Kindly let me know a solution and an explanation why this is happening if anyone else has encountered the same problem ever.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 17:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189729#M47907</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2014-11-27T17:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189730#M47908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With problems like these a posting your SAS log showing your complete PROC SQL step, the errors reported, plus any Teradata options used would be helpful. Providing code snippets does not give the full picture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a first step does your userid have update permission on the table you are trying to update?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 19:37:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189730#M47908</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-11-27T19:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189731#M47909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With implicit SQL you want to use "&lt;SPAN class="ft" style="font-size: small; line-height: 1.5em; color: #545454; font-family: arial, sans-serif; background-color: #ffffff;"&gt;OPTIONS SASTRACE=',,,d' SASTRACELOC=SASLOG NOSTSUFFIX;&lt;/SPAN&gt;&lt;SPAN style="font-size: small; line-height: 1.5em; color: #545454; font-family: arial, sans-serif; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;" before the SQL so that you can see in the log what data base SQL has actually been sent to the data base. This should then help to identify what's going wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 20:33:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189731#M47909</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-11-27T20:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189732#M47910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first sight (waiting for the real code) you are using implicit sql to Teradata. That is a bad idea for several reasons.&lt;/P&gt;&lt;P&gt;The tables are to be expected into big sizing type. Getting the data to SAS and back is not a smart approach when you would get it to work.&amp;nbsp;&amp;nbsp; (the select *)&lt;/P&gt;&lt;P&gt;The cursor message is telling you have done something that would be acceptable in a OLTP approach with small data sizing in a transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The explit pass through using execute statement with Teradata SQL should do the job without any problem in the case you would update the table (why select * ?)&lt;/P&gt;&lt;P&gt;May be a Teradata view creation (replace view) storing that at Teradata could do the job you are needing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what you are trying to achieve.&lt;/P&gt;&lt;P&gt;What do you want to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 21:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189732#M47910</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-11-27T21:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189733#M47911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the kind feedback. &lt;/P&gt;&lt;P&gt;Suppose I have a table xyz in teradata with column&lt;/P&gt;&lt;P&gt;Job_id, status and end_time. &lt;/P&gt;&lt;P&gt;At first when a job starts, the precode sends the job_id, Start_time I. E. "&amp;amp;etls_startTime"dt and status as inprogress &lt;/P&gt;&lt;P&gt;After the job executed I want to update the end time of that job using current datetime as" &amp;amp; etls_endTime" is working because it is captured after the precode has run. &lt;/P&gt;&lt;P&gt;This is what I want to achieve, but I don't want use status Handeling due to some reason. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 01:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189733#M47911</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2014-11-28T01:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189734#M47912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I can update or insert or create the table if I do not pass through into teradata &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 01:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189734#M47912</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2014-11-28T01:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189735#M47913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you just want to run code in remote data base use EXECUTE statement instead of trying to use a SELECT statement to execute a statement.&amp;nbsp; Also depending on the connection mode to teradata you might need to also execute a&amp;nbsp; COMMIT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;execute ( update database.table_name set column = current_timestamp(0) where id=xxxx ) by teradata ;&lt;/P&gt;&lt;P&gt;execute ( commit ) by teradata ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 02:04:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189735#M47913</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-11-28T02:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189736#M47914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked!!!&lt;/P&gt;&lt;P&gt;Thank you so much Tom.&lt;/P&gt;&lt;P&gt;But I am nort able to insert current timestamp using sas function datetime() if I am not passing through.&lt;/P&gt;&lt;P&gt;by using,&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;insert into tera.table_name set column = datetime();&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is throwing me error:&lt;/P&gt;&lt;P&gt;CURSOR PROCESSING IN TERADATA MODE IS NOT ALLOWED.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 05:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189736#M47914</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2014-11-28T05:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189737#M47915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I simply want to insert current datetime in teradata table by simply using,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;update tera.table_name set column = datetime();&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is throwing me error:&lt;/P&gt;&lt;P&gt;CURSOR PROCESSING IN TERADATA MODE IS NOT ALLOWED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you suggest how to do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 05:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189737#M47915</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2014-11-28T05:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189738#M47916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you have followed the Teradata skill sets training by SAS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chapter 6 Creating, Updating and Loading Teradata Tables from SAS 6-1&lt;/P&gt;&lt;P&gt;6.1 Creating and loading Teradata tables from SAS 6-3&lt;/P&gt;&lt;P&gt;6.2 Loading data into Teradata leveraging Teradata Load Utilities from SAS 6-24&lt;/P&gt;&lt;P&gt;6.3 Updating Teradata tables from SAS (optional) 6-44&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need the set several options for Teradata access and do that in some structured way.&lt;/P&gt;&lt;P&gt;Set bulkload=yes and define you primary-index sensible or set no-primary index. Teradata is parallel processing on a lot of node and does the spread by some key derived from that primary index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you are getting a note on cursor usage you are torturing yourself and Teradata as that is OLPT access not the method where Teradata is designed for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 10:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189738#M47916</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-11-28T10:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189739#M47917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does that statement even mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make a table in SAS with the record you want to insert and then insert it. That way SAS is just moving data and not a function call.&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; column=datetime();&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc append data=temp base=tera.table ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189739#M47917</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-11-28T15:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189740#M47918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Review the sas/access docs when not having the SAS Teradata skills, &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001405937.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001405937.htm"&gt;SAS/ACCESS(R) 9.2 for Relational Databases: Reference, Fourth Edition&lt;/A&gt; (Maximizing Teradata Load Performance)&amp;nbsp; &lt;/P&gt;&lt;P&gt;The sample with using append is there and showing the dedicated needed options for that step. The one for avoiding skewness with primary index will also be somewhere.&lt;/P&gt;&lt;P&gt;Teradata is behaving different as of his massive parallel design optimized&amp;nbsp; for teradata sizes. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 17:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189740#M47918</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-11-28T17:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189741#M47919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; I did that earlier Tom what you are suggesting now. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Data test;&lt;/P&gt;&lt;P&gt;A=datetime() ;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc sql;&lt;/P&gt;&lt;P&gt;Update. Tera.table set column=(select a from work.Test) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And still not working. Same error CURSOR PROCESSING IS NOT ALLOWED IN TERADATA MODE. &lt;/P&gt;&lt;P&gt;It does work on an insert statement but not in update statement. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 04:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189741#M47919</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2014-11-29T04:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189742#M47920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I haven't Jaap,&amp;nbsp; I'm just 3 weeks new to SAS and I'm learning on my own. That's why I haven't read those chapters which you are referring. But I'll surely gona read them now. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 04:57:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189742#M47920</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2014-11-29T04:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189743#M47921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Syntax like :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Update Tera.table set column=(select a from work.Test) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Is probably not going to work very well since WORK.TEST is a SAS table and TERA.TABLE is a database table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;But If you really just have a single value then there is no need to reference another table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Did you try just setting the value?&lt;/P&gt;&lt;P&gt;%let jobid=101;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;update tera.table set stop_dt = "%sysfunc(datetime(),datetime20)"dt &lt;/P&gt;&lt;P&gt;&amp;nbsp; where jobid = &amp;amp;jobid &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to write pass-through SQL to run inside the database you can generate a datetime literal in Teradata using this format:&lt;/P&gt;&lt;P&gt;TIMESTAMP 'YYYY-MM-DD HH:MM:SS'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 06:31:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189743#M47921</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-11-29T06:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189744#M47922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that also but that didn't worked either. Through pass through its working fine, again thanks to you, so for now I would go with it as an alternative method. &lt;/P&gt;&lt;P&gt;But I will look into it and share it with you also if it happens. &lt;/P&gt;&lt;P&gt;Also I would like you to have a look into my another query as well which is &lt;/P&gt;&lt;P&gt;&lt;A __default_attr="239873" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://communities.sas.com/" modifiedtitle="true" title="Re: Generic script to pick datepart of datetime field and insert into tables"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you could help me with it as well. Would be really grateful. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 07:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189744#M47922</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2014-11-29T07:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime()  update and insert error in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189745#M47923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Teradata is different as to other databases. Amps PE bynet with nodes are dedicated words&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.teradatatech.com/?p=103" title="http://www.teradatatech.com/?p=103"&gt; Teradata Architecture &amp;amp;raquo; TeraData Tech&lt;/A&gt; Looks to me a nice start for that.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The better one is looking at Teradata.com&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.info.teradata.com/htmlpubs/DB_TTU_14_00/index.html#page/SQL_Reference/B035_1141_111A/ch04.106.05.html"&gt;http://www.info.teradata.com/htmlpubs/DB_TTU_14_00/index.html#page/SQL_Reference/B035_1141_111A/ch04.106.05.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;That site is reacting weird sometimes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You see the nodes and architecture behind.&amp;nbsp; Distributed shared nothing.&lt;BR /&gt;That is why you cannot use the same naïve coding approaches like the basic OLTP ones. Using Teradata like an OLTP is a bad idea. Trying to do the inserts like an OLTP as bad.&lt;/P&gt;&lt;P&gt;You see something of that back in the SAS/Access documentation. Being aware what is different behind that at Teradata is more important. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 08:33:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Datetime-update-and-insert-error-in-teradata/m-p/189745#M47923</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-11-29T08:33:38Z</dc:date>
    </item>
  </channel>
</rss>

