2

I am at the Parent Enterprise Level and trying to sort the SubscriberKey column from the All Subscribers List into a Target Data Extension: All_Subscribers_DE. The columns are populated but the ORDER BY is not working. No error.


SELECT
          TOP 100 PERCENT
*
FROM
          _Subscribers s

ORDER BY
          [SubscriberKey] ASC

There are 1,582,522 records found. When I changed the 100 PERCENT to a number, the ORDER BY works:


SELECT
          TOP 1600000
*
FROM
          _Subscribers s

ORDER BY
          [SubscriberKey] ASC

But here SFMC uses percent as examples:

Random Sample of 33 Percent Exclusion https://help.salesforce.com/articleView?id=mc_as_sql_reference.htm&type=5

1
  • Because subscribers key is an alpha numberic value?
    – 0xsegfault
    Feb 20, 2019 at 20:44

1 Answer 1

0

Your question is very interesting, I confirm ORDER BY can only work with TOP NUMBER not TOP PERCENT. I guess the reason for this is that SFMC wants to control SQL performance with ORDER BY, that's why it can only work with TOP or LIMIT FETCH. However people can cheat with TOP 100 PERCENT that's why they ignore it in the backend

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .