<?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: In-DB warning using ORDER BY window function SQL in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/431177#M80705</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/46823"&gt;@nakamott&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are quite a few SQL queries that don't work in Alteryx, just as most Alteryx-formed SQL queries don't work in SSMS. Order by is one of said queries. I have only begun using In-DB tools as well&amp;nbsp;&lt;SPAN class="emoji"&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are looking to sort your data, you'd have to configure your Sample In-DB like shown below. You want to change the top left box to Percent and type in 100 and tick the "Sample records based on order:" box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sample In DB.png" style="width: 391px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/67277i8FE267685B7A9115/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sample In DB.png" alt="Sample In DB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise you'd have to stream your data out and use the normal Alteryx sort tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have noticed that sometimes the Sample In-DB doesn't work as intended for me but the majority of the time it does. Haven't been able to work it out yet though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps mate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Andrew&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2019 04:08:38 GMT</pubDate>
    <dc:creator>AndrewBanh</dc:creator>
    <dc:date>2019-06-25T04:08:38Z</dc:date>
    <item>
      <title>In-DB warning using ORDER BY window function SQL</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/431100#M80689</link>
      <description>&lt;P&gt;I am receiving the warning "Using order by in initial In-DB query may result in a query error. Consider using the sort on the sample or stream out tools."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not find much information on this error. Was wondering if it also applies to the ORDER BY used in window functions and what the error will be?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 23:09:36 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/431100#M80689</guid>
      <dc:creator>nakamott</dc:creator>
      <dc:date>2019-06-24T23:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: In-DB warning using ORDER BY window function SQL</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/431177#M80705</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/46823"&gt;@nakamott&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are quite a few SQL queries that don't work in Alteryx, just as most Alteryx-formed SQL queries don't work in SSMS. Order by is one of said queries. I have only begun using In-DB tools as well&amp;nbsp;&lt;SPAN class="emoji"&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are looking to sort your data, you'd have to configure your Sample In-DB like shown below. You want to change the top left box to Percent and type in 100 and tick the "Sample records based on order:" box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sample In DB.png" style="width: 391px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/67277i8FE267685B7A9115/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sample In DB.png" alt="Sample In DB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise you'd have to stream your data out and use the normal Alteryx sort tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have noticed that sometimes the Sample In-DB doesn't work as intended for me but the majority of the time it does. Haven't been able to work it out yet though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps mate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Andrew&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 04:08:38 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/431177#M80705</guid>
      <dc:creator>AndrewBanh</dc:creator>
      <dc:date>2019-06-25T04:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: In-DB warning using ORDER BY window function SQL</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188475#M294702</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have few queries that has window functions like rank over parition by ,,,, and order by&lt;/P&gt;&lt;P&gt;when I try to run the query in indb connection i am getting an errror&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This post is an old one but just wanted to confirm if it is still an iissue&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 21:53:42 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188475#M294702</guid>
      <dc:creator>Raj_007</dc:creator>
      <dc:date>2023-09-19T21:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: In-DB warning using ORDER BY window function SQL</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188514#M294718</link>
      <description>&lt;P&gt;tbh - order by usually works. It really depends upon your back end DB. Alteryx is basically saying use Order By as a sort when you are using datastream out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 02:37:30 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188514#M294718</guid>
      <dc:creator>apathetichell</dc:creator>
      <dc:date>2023-09-20T02:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: In-DB warning using ORDER BY window function SQL</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188682#M294771</link>
      <description>&lt;P&gt;Hi, thank you so much - the way i have the queries are like derived tables&lt;/P&gt;&lt;P&gt;source is Oracle DB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WITH Test AS (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;),&lt;/P&gt;&lt;P&gt;select from Test&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;something like this - the query structure is soemthing like this but too many queries - within that derived table or CTE i have the rank over partition by field and order by some field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so this is where i have the order by... so iam confused on how to get this as it is part of the query - I dont need any sort once i get the main dataset&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 13:23:44 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188682#M294771</guid>
      <dc:creator>Raj_007</dc:creator>
      <dc:date>2023-09-20T13:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: In-DB warning using ORDER BY window function SQL</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188698#M294775</link>
      <description>&lt;P&gt;You need to use subqueries vs CTE - WITH does not work In-DB because Alteryx wraps your entire statement in WITH command.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 13:59:55 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188698#M294775</guid>
      <dc:creator>apathetichell</dc:creator>
      <dc:date>2023-09-20T13:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: In-DB warning using ORDER BY window function SQL</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188720#M294781</link>
      <description>&lt;P&gt;Thank you so much - really helpful&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 14:29:14 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1188720#M294781</guid>
      <dc:creator>Raj_007</dc:creator>
      <dc:date>2023-09-20T14:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: In-DB warning using ORDER BY window function SQL</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1192367#M295733</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/46823"&gt;@nakamott&lt;/a&gt;&amp;nbsp; The warning is very conservative and even happen when you're doing rank with a windowing function directly in the connect in-db tool. But it's just that : a warning and not an error message. I have never encountered a case when it leads to an error.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Simon&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 04:28:55 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/In-DB-warning-using-ORDER-BY-window-function-SQL/m-p/1192367#M295733</guid>
      <dc:creator>simonaubert_bd</dc:creator>
      <dc:date>2023-09-29T04:28:55Z</dc:date>
    </item>
  </channel>
</rss>

