<?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: fedsql request in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/fedsql-request/m-p/916315#M360945</link>
    <description>&lt;P&gt;FedSQL is pretty strictly ANSI compliant. Expressions require date constants to be written in ANSI-standard format -&amp;nbsp; DATE'YYYY-MM-D'. The raw SAS date number must be formatted properly and surrounded by&amp;nbsp;&lt;EM&gt;single&lt;/EM&gt; quotes. You can use PUTN to format the value, but the dashes will be misinterpreted as a minus sign if you use&amp;nbsp; %SYSFUNC to execute the PUTN function, and macro code won't execute if surrounded by single quotes.&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Use QSYSFUNC to mask the dashes in the formatted text.&lt;/LI&gt;
&lt;LI&gt;Use the %TSLIT macro to allow the macro code to resolve before adding the necessary single quotes.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data jours;
  input jour;
datalines;
23038
23039
23040
23041
23042
;

%let Aujourdhui=23040;
proc FedSQL;
select * 
	from jours
	where jour&amp;gt;=date%tslit(%qsysfunc(putn(&amp;amp;Aujourdhui,yymmddd10.)));
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2024 15:33:36 GMT</pubDate>
    <dc:creator>SASJedi</dc:creator>
    <dc:date>2024-02-15T15:33:36Z</dc:date>
    <item>
      <title>fedsql request</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fedsql-request/m-p/916306#M360940</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i have a macro variable&amp;nbsp; in numeric. like &amp;amp;jour = 23040,&lt;/P&gt;&lt;P&gt;In CAS i try to find line where dateColumn &amp;gt; &amp;amp;jour bu i have the error :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Operator is not unique: DATE &amp;gt; INTEGER&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone help me plz.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 14:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fedsql-request/m-p/916306#M360940</guid>
      <dc:creator>ajulio4</dc:creator>
      <dc:date>2024-02-15T14:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: fedsql request</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fedsql-request/m-p/916315#M360945</link>
      <description>&lt;P&gt;FedSQL is pretty strictly ANSI compliant. Expressions require date constants to be written in ANSI-standard format -&amp;nbsp; DATE'YYYY-MM-D'. The raw SAS date number must be formatted properly and surrounded by&amp;nbsp;&lt;EM&gt;single&lt;/EM&gt; quotes. You can use PUTN to format the value, but the dashes will be misinterpreted as a minus sign if you use&amp;nbsp; %SYSFUNC to execute the PUTN function, and macro code won't execute if surrounded by single quotes.&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Use QSYSFUNC to mask the dashes in the formatted text.&lt;/LI&gt;
&lt;LI&gt;Use the %TSLIT macro to allow the macro code to resolve before adding the necessary single quotes.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data jours;
  input jour;
datalines;
23038
23039
23040
23041
23042
;

%let Aujourdhui=23040;
proc FedSQL;
select * 
	from jours
	where jour&amp;gt;=date%tslit(%qsysfunc(putn(&amp;amp;Aujourdhui,yymmddd10.)));
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 15:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fedsql-request/m-p/916315#M360945</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2024-02-15T15:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: fedsql request</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fedsql-request/m-p/916413#M360962</link>
      <description>&lt;P&gt;Hello. thks you so much. It helps and it works&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 08:30:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fedsql-request/m-p/916413#M360962</guid>
      <dc:creator>ajulio4</dc:creator>
      <dc:date>2024-02-16T08:30:29Z</dc:date>
    </item>
  </channel>
</rss>

