<?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: DB2 pass-through SQL - unknown functions/clauses? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/DB2-pass-through-SQL-unknown-functions-clauses/m-p/860074#M82511</link>
    <description>&lt;P&gt;The code portion within the connect to is DB2 syntax and you will need to consult DB2 documentation and forums with detail questions.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1677044206797.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80694i87A3522F5E157FF5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1677044206797.png" alt="Patrick_0-1677044206797.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It's long ago that I've used DB2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WITH UR is for &lt;STRONG&gt;U&lt;/STRONG&gt;ncommited &lt;STRONG&gt;R&lt;/STRONG&gt;ead (dirty reading). It's the fastest way to read data in DB2 because it doesn't control and synchronize with any update, insert or delete that might happen at the same time. Using UR is very o.k. if that's some reporting data base where you can be sure that the updates happen at a time where your queries won't run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This bit looks "suspicious"&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1677044520397.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80695i11AABA43F3942ED7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_1-1677044520397.png" alt="Patrick_1-1677044520397.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but then eventually totally o.k. with DB2 SQL.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2023 05:44:09 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2023-02-22T05:44:09Z</dc:date>
    <item>
      <title>DB2 pass-through SQL - unknown functions/clauses?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/DB2-pass-through-SQL-unknown-functions-clauses/m-p/860069#M82510</link>
      <description>&lt;P&gt;Thought I was ok with pass-thru SQL, but trying to understand:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The &lt;STRONG&gt;WEEKDAYCD='' WITH UR&lt;/STRONG&gt; clause? &lt;EM&gt;(Presumably some DB2-specific syntax I haven't seen before)&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;What the &lt;STRONG&gt;X(DT)&lt;/STRONG&gt; does? &lt;EM&gt;(Is this passed-through, so DB2-specific? Or a SAS function? Is it an SQL variant of the 'X' command?)&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
  CONNECT TO DB2(SSID=DSN);
  CREATE TABLE MYWORK AS SELECT * FROM CONNECTION TO DB2
    (SELECT MAX(BIRTH_DT)
      FROM CUST.CALENDAR
      WHERE BIRTH_DT &amp;lt; CURRENT DATE
      AND WEEKDAYCD='' WITH UR)X(DT); 
DISCONNECT FROM DB2;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Feb 2023 04:57:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/DB2-pass-through-SQL-unknown-functions-clauses/m-p/860069#M82510</guid>
      <dc:creator>AndrewHowell</dc:creator>
      <dc:date>2023-02-22T04:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 pass-through SQL - unknown functions/clauses?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/DB2-pass-through-SQL-unknown-functions-clauses/m-p/860074#M82511</link>
      <description>&lt;P&gt;The code portion within the connect to is DB2 syntax and you will need to consult DB2 documentation and forums with detail questions.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1677044206797.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80694i87A3522F5E157FF5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1677044206797.png" alt="Patrick_0-1677044206797.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It's long ago that I've used DB2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WITH UR is for &lt;STRONG&gt;U&lt;/STRONG&gt;ncommited &lt;STRONG&gt;R&lt;/STRONG&gt;ead (dirty reading). It's the fastest way to read data in DB2 because it doesn't control and synchronize with any update, insert or delete that might happen at the same time. Using UR is very o.k. if that's some reporting data base where you can be sure that the updates happen at a time where your queries won't run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This bit looks "suspicious"&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1677044520397.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80695i11AABA43F3942ED7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_1-1677044520397.png" alt="Patrick_1-1677044520397.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but then eventually totally o.k. with DB2 SQL.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 05:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/DB2-pass-through-SQL-unknown-functions-clauses/m-p/860074#M82511</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-02-22T05:44:09Z</dc:date>
    </item>
  </channel>
</rss>

