Process Mining
SQL Differences Between Snowflake and SQL Server - Automation Cloud latest
Process Mining
Last updated Nov 28, 2023

SQL Differences Between Snowflake and SQL Server

SQL Server Vs. Snowflake

In a local development environment, transformations are run on SQL Server, while Snowflake is used in UiPath Process Cloud. Although most SQL statements will work both on SQL Server and Snowflake, there can be slight differences in syntax, which may lead to different return results.

To write SQL statements that work on both database systems:

  • Write field names in double quotes, e.g. Table."Field".
  • Prevent using SQL functions that are different in Snowflake and SQL Server, e.g. string_agg() and listagg().

    The pm_utils package comes with a set of functions that work on both database types, see Multiple databases. For example, instead of using string_agg() or listagg(), the pm_utils.string_agg() will result in the same behavior for both databases. If pm_utils does not contain the desired function, then a Jinja statement should be created to make sure the right function is called on each database.

String Concatenation

To combine to strings, use the pm_utils.concat() function. This will yield the same results for both SQL Server and Snowflake.

Example: pm_utils.concat("This is a nice string", null) = "This is a nice string" Concatenating strings should not be done with operators like + or ||, as they are different for both databases (Snowflake uses || and SQL Server uses +). Also the standard concat() function has different behavior on both systems:

SQL Server


null values will be ignored and treated as an empty string.

null values will cause the entire result to be null.


Sorting is handled differently in Snowflake and SQL server.

Example: ... order by "Attribute_1" desc, "Attribute_2" ...

Null Values

SQL Server


null will default be sorted first (ascending)

null will default be sorted last (ascending)

Handling Capital Letters

SQL Server


capitals are sorted as expected (AaBbCc)

first sorts by capitals, then by non-capitals (ABCabc)


Example: -Accountant-

SQL Server


dashes are ignored in sorting (so '-Accountant-' is treated same as 'Accountant')

dashes will be sorted at the top

Whitespace Handling

When you group by values “A“ and “ A“, this is seen as one value in SQL Server, but as two different values in Snowflake. Therefore trimming is advised if your data may cause this issue.

Case Sensitivity

By default, SQL Server is case insensitive whereas Snowflake is case sensitive. This means that Table."Field" = "Some_value" and Table."Field" = "SOME_VALUE" will return the same result set in SQL Server, but potentially two different result sets in Snowflake.

You are advised to change the behavior of your local SQL Server database to match Snowflakes behavior, to prevent any problems. This can be accomplished by setting the database collation to a case sensitive value.

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2023 UiPath. All rights reserved.