<?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 snowflake tables in sas code having issue with case sensitivity in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943342#M369764</link>
    <description>&lt;P&gt;Snowflake is a variation of Posgresl.&lt;/P&gt;
&lt;P&gt;When you define the datasets ("tables") and variables ("columns") then make sure you define them using only lowercase letters.&amp;nbsp; &amp;nbsp;If you reference them normally (select Varname from DSname) then it will look for lowercase variables.&amp;nbsp; If you use quoted strings (select "Varname" from "DSname") then it will look for names that exactly match the case used.&amp;nbsp; If you define them with mixed case (aka "CaMeL" case) then you will need to always reference them using quoted strings in your SQL code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/20878932/are-postgresql-column-names-case-sensitive" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/20878932/are-postgresql-column-names-case-sensitive&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2024 17:46:13 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-09-10T17:46:13Z</dc:date>
    <item>
      <title>accessing snowflake tables in sas code having issue with case sensitivity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943289#M369753</link>
      <description>&lt;P&gt;can someone help on, this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a sas reporting code which is accessing snowflake ,oracle, greenplum etx multiple source tables. as we all know sas doesnot have issue with case sensitivity, but when i use snowflake in lower case it&amp;nbsp; is throwing an error data doesnot exist. but when i use the same snowflake table in uppercase its giving output. can someone help on this ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 12:20:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943289#M369753</guid>
      <dc:creator>Shanthi123</dc:creator>
      <dc:date>2024-09-10T12:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: accessing snowflake tables in sas code having issue with case sensitivity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943341#M369763</link>
      <description>&lt;P&gt;Are you attempting to write code that is intended to work against multiple data sources without modification? Or is this "I have a Snowflake version of a report and it has this problem?"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would help us to provide a relevant targeted solution if you could share your code. Best would be to include a Log entry with the errors and without. An example of how your code connects to Snowflake would be helpful as someone may know a connection setting to "ignore" case for some operations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to &lt;STRONG&gt;guess&lt;/STRONG&gt; that this might involve where the name of a table or variable is used. If the source, such as Snowflake, is sensitive to case for tables or variables (SAS isn't) then you have to know the case of the spelling. There may be workarounds possible but would have to see examples. And some of the workarounds may impose notable performance hits.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 17:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943341#M369763</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-10T17:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: accessing snowflake tables in sas code having issue with case sensitivity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943342#M369764</link>
      <description>&lt;P&gt;Snowflake is a variation of Posgresl.&lt;/P&gt;
&lt;P&gt;When you define the datasets ("tables") and variables ("columns") then make sure you define them using only lowercase letters.&amp;nbsp; &amp;nbsp;If you reference them normally (select Varname from DSname) then it will look for lowercase variables.&amp;nbsp; If you use quoted strings (select "Varname" from "DSname") then it will look for names that exactly match the case used.&amp;nbsp; If you define them with mixed case (aka "CaMeL" case) then you will need to always reference them using quoted strings in your SQL code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/20878932/are-postgresql-column-names-case-sensitive" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/20878932/are-postgresql-column-names-case-sensitive&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 17:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943342#M369764</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-09-10T17:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: accessing snowflake tables in sas code having issue with case sensitivity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943441#M369768</link>
      <description>&lt;P&gt;here is my code :&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;libname rodm snow
   server="XXXXXXXXXX.snowflakecomputing.com"
      db=XXXXXX warehouse=XXXXX
      role=XXXXXX
      schema=XXXXXXX
user=
password=;
proc sql;
select count(*) from rodm.vh_assessment_data;
quit;
* when i try to run  above code its throwing an error : data doesnot exist.
proc sql;
select count(*) from rodm.VH_ASSESSMENT_DATA;
quit;
* but when i try to run the above code it is giving output with some count.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 06:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943441#M369768</guid>
      <dc:creator>Shanthi123</dc:creator>
      <dc:date>2024-09-11T06:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: accessing snowflake tables in sas code having issue with case sensitivity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943587#M369807</link>
      <description>&lt;P&gt;I suggest you rerun your tests adding the - &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n1qsjn9a18pja2n1gdctb7mc1ik8.htm" target="_blank" rel="noopener"&gt;PRESERVE_TAB_NAMES&lt;/A&gt; = NO - option to your LIBNAME to see if that changes the behaviour.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 02:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943587#M369807</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-09-12T02:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: accessing snowflake tables in sas code having issue with case sensitivity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943640#M369819</link>
      <description>&lt;P&gt;First turn on the options that tell SAS to display the implicitly created database code in the SAS log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nostsuffix sastrace=',,,ds' sastraceloc=saslog ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And then run your examples and compare the differences in the generated SQL code that SAS ran.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second try writing the SQL code yourself using passthru SQL.&amp;nbsp; You can use your existing LIBREF to make the connection, but you will have to include the schema in your SQL code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname rodm snow ... schema=MYSCHEMA ... ;
proc sql;
connect using  rodm;
select * from connection to rodm
(select count(*) from MYSCHEMA.vh_assessment_data)
;
select * from connection to rodm
(select count(*) from MYSCHEMA."vh_assessment_data")
;
select * from connection to rodm
(select count(*) from MYSCHEMA.VH_ASSESSMENT_DATA)
;
select * from connection to rodm
(select count(*) from MYSCHEMA."VH_ASSESSMENT_DATA")
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Third figure out what the SNOWFLAKE method is do listing the tables/views in a schema and run that using pass thru SQL and check the case of the names for the tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 13:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/943640#M369819</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-09-12T13:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: accessing snowflake tables in sas code having issue with case sensitivity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/945070#M370276</link>
      <description>I was having the same issue. This worked for me. Thank you!</description>
      <pubDate>Tue, 24 Sep 2024 15:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/accessing-snowflake-tables-in-sas-code-having-issue-with-case/m-p/945070#M370276</guid>
      <dc:creator>NewSASPerson</dc:creator>
      <dc:date>2024-09-24T15:42:27Z</dc:date>
    </item>
  </channel>
</rss>

