<?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 SAS SQL : ERROR and DEBUG in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195568#M305197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I run this good,&lt;/P&gt;&lt;P&gt;I get the error message: ERROR: Observation was not added/updated because a matching primary key value was not found for foreign key var1.&lt;/P&gt;&lt;P&gt;Please, do you have any solution ?&lt;/P&gt;&lt;P&gt;Is it possible to debug a sas sql proc ?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; insert into lb.test1 * from test2;&lt;/P&gt;&lt;P&gt; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Observation was not added/updated because a matching primary key value was not found for foreign key var1.&lt;/P&gt;&lt;P&gt;NOTE: Deleting the successful inserts before error noted above to restore table to a consistent state.&lt;/P&gt;&lt;P&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 May 2015 20:25:58 GMT</pubDate>
    <dc:creator>LineMoon</dc:creator>
    <dc:date>2015-05-28T20:25:58Z</dc:date>
    <item>
      <title>SAS SQL : ERROR and DEBUG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195568#M305197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I run this good,&lt;/P&gt;&lt;P&gt;I get the error message: ERROR: Observation was not added/updated because a matching primary key value was not found for foreign key var1.&lt;/P&gt;&lt;P&gt;Please, do you have any solution ?&lt;/P&gt;&lt;P&gt;Is it possible to debug a sas sql proc ?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; insert into lb.test1 * from test2;&lt;/P&gt;&lt;P&gt; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Observation was not added/updated because a matching primary key value was not found for foreign key var1.&lt;/P&gt;&lt;P&gt;NOTE: Deleting the successful inserts before error noted above to restore table to a consistent state.&lt;/P&gt;&lt;P&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 20:25:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195568#M305197</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-05-28T20:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL : ERROR and DEBUG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195569#M305198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that there is built-in function to trace which records get's rejected due to a constraint violation.&lt;/P&gt;&lt;P&gt;But it's easy to check, just query the table which holds the PK to find out which FKs are rejected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 08:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195569#M305198</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-05-29T08:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL : ERROR and DEBUG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195570#M305199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could switch on the &lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/67885/HTML/default/viewer.htm#n0ndg2uekz7qkbn1caoki2hzqx8l.htm"&gt;audit trail functionality&lt;/A&gt; on the SAS data Set, this will then give you more detailed information on why a insert did not work. You also can get the before and after image, if you make changes to existing observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample code that illustrates the use of the audit trail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*&lt;BR /&gt;* create some test data&lt;BR /&gt;*;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; test;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; i = &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;10&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char = put(i, &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;roman.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;output&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*&lt;BR /&gt;* add a primary key to the table&lt;BR /&gt;*;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;sql&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;alter&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; test&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;add&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;primary&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;key&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; ( i )&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;quit&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*&lt;BR /&gt;* switch on audit trail&lt;BR /&gt;*;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;datasets&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;lib&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=work;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;audit&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; test;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;initiate&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;audit_all&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=yes;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;quit&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*&lt;BR /&gt;* test data to inserts&lt;BR /&gt;*;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; test2;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; i = &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;7&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;12&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char = put(i, &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;z4.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;output&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*&lt;BR /&gt;* add data to existing table&lt;BR /&gt;* undo_policy will continue processing even&lt;BR /&gt;* if there is a problem&lt;BR /&gt;*;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;sql&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;undo_policy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=none;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;insert&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; test &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; test2;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;quit&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*&lt;BR /&gt;* print the audit trail information&lt;BR /&gt;*;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;title&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"Audit Trail"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=test(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;type&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=audit);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;title&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 11:28:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195570#M305199</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-05-29T11:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL : ERROR and DEBUG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195571#M305200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great tip &lt;A __default_attr="2147" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 11:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195571#M305200</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-05-29T11:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL : ERROR and DEBUG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195572#M305201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;As simple and easy your question is as difficult it is.&amp;nbsp;&amp;nbsp; Possible to debugging a proc sql proc?&lt;BR /&gt;&lt;BR /&gt;1/ Reverse engineering of “proc SQL” is what WPS has done. &lt;BR /&gt;I assume this is not your question but you are thinking how the SQL handling&amp;nbsp; internally is solved. The dataprocessing.&lt;BR /&gt;The whole goal of using SQL is to hide common known solutions as sorting, indexing and balance line from the user.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;Knowing that SQL the data handling will&amp;nbsp; do with those you are knowing it is better than the average programmer is able to do with far less human effort. The top programmers can do things that will never come into reach of SQL. That is why you have NOSQL HAdoop and more of those.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;2/ “proc SQL”is SAS internal and external processing. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;2a/ Extermal you have sastrace debugging&lt;BR /&gt; &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/67589/HTML/default/viewer.htm#n0732u1mr57ycrn1urf24gzo38sc.htm"&gt;http://support.sas.com/documentation/cdl/en/acreldb/67589/HTML/default/viewer.htm#n0732u1mr57ycrn1urf24gzo38sc.htm&lt;/A&gt; an external DBMS often is supporting the “explain” or “plan” statement &lt;A href="http://docs.oracle.com/cd/B10500_01/server.920/a96533/ex_plan.htm"&gt;http://docs.oracle.com/cd/B10500_01/server.920/a96533/ex_plan.htm&lt;/A&gt;&amp;nbsp; &lt;A href="https://technet.microsoft.com/en-us/library/ms178071(v=sql.105).aspx"&gt;https://technet.microsoft.com/en-us/library/ms178071(v=sql.105).aspx&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;There is a whole area behind there how a DBA can change the behavior (plans) and nothing is changed in the SQL. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;&lt;BR /&gt;2a/ Internal SAS Sql processing is more limited. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;It is there but tedious to work on.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;&lt;A href="http://www2.sas.com/proceedings/sugi30/101-30.pdf"&gt;http://www2.sas.com/proceedings/sugi30/101-30.pdf&lt;/A&gt; and &lt;A href="http://support.sas.com/resources/papers/proceedings13/200P-2013.pdf"&gt;http://support.sas.com/resources/papers/proceedings13/200P-2013.pdf&lt;/A&gt;&lt;BR /&gt; &lt;A href="http://www8.sas.com/scholars/Proceedings/2006/ETL/ET07_06.PDF"&gt;http://www8.sas.com/scholars/Proceedings/2006/ETL/ET07_06.PDF&lt;/A&gt;&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;Having those papers you have your answer. It is possible but not easy (_method)&lt;BR /&gt;&lt;BR /&gt;3/ The logical processing error and more.&lt;BR /&gt;This is where your question is about. SAS datasets normally are seen just as being sequential ones. However you can add keys&amp;nbsp; and constraints in a way the other SQL environments are knowing those.&amp;nbsp; SQL was designed at the transactional era. SAS is supporting SQL-99, others mostly SQL-2013.&lt;BR /&gt;What is happening with those that they are adding additional logic to the data processing. That logic can be defined by yourself or is part of something&amp;nbsp; somebody else has done.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/67885/HTML/default/viewer.htm#p0te4txy6dyzs9n1csptlqoktu7m.htm"&gt;http://support.sas.com/documentation/cdl/en/lrcon/67885/HTML/default/viewer.htm#p0te4txy6dyzs9n1csptlqoktu7m.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;Now see sheet 36 page 39 of &lt;A href="https://support.sas.com/training/tutorial/el/libsppg3_cic.pdf"&gt;https://support.sas.com/training/tutorial/el/libsppg3_cic.pdf&lt;/A&gt;&amp;nbsp; there is your error message and the explanation &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt;I think you have now all material from a detailed top-view to solve your SQL questions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 11:46:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SQL-ERROR-and-DEBUG/m-p/195572#M305201</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-05-29T11:46:20Z</dc:date>
    </item>
  </channel>
</rss>

