SQLParity

SQL converter

Rewrite quoting, escaping, row limits and function names between 16 dialects, with a list of what it refused to guess at.

1

SQL Server (T-SQL) query

2

Apache Spark SQL query

What it changed

  • TOP 10LIMIT 101 place
  • [name]`name`8 places
  • '', backslash is literal\', backslash escapes1 place
  • ISNULL()COALESCE()1 place
  • LEN(x)LENGTH(RTRIM(x))1 place
  • current timestampCURRENT_TIMESTAMP1 place
  • VARCHARSTRING1 place

What you still need to do

Nothing in this query is the kind of thing that translates wrongly. Still run it once before you trust it.

Anything left in this list was recognised and left as it was on purpose. A function renamed to one that takes its arguments in a different order produces SQL that runs and returns the wrong rows, which is worse than SQL that fails.

Converting SQL Server (T-SQL) to Apache Spark SQL: Key Syntax Differences

Translating SQL queries between SQL Server (T-SQL) and Apache Spark SQL involves subtle dialect differences that standard text find-and-replace often misses. Everything below is processed entirely in your browser using SQLParity.

Identifier Quoting

SQL Server (T-SQL): [name]

Apache Spark SQL: `name`

String Literal Escaping

SQL Server (T-SQL): Quotes are doubled (''), backslash is literal.

Apache Spark SQL: Quotes are escaped with backslash (\'), backslash is an escape character.

Null-Safe Equality

Apache Spark SQL: NOT (colA <=> colB)

Why In-Browser SQL Conversion Matters

Database migrations frequently involve proprietary business logic, sensitive table schemas, and production column names. When converting SQL between SQL Server (T-SQL) and Apache Spark SQL, SQLParity executes all parsing, tokenization, and code rewriting locally in your browser. Zero queries or schemas are transmitted to remote servers.