SQL Connector SQL Server Parameter Format

Had to migrate from PostgreSQL to SQL Server, so needed to update my SQL Connector queries. The ones that were using parameters ($1, $2, etc.) were not working.

PostgreSQL
SELECT * FROM my_function $1
where $1 was my parameter called ‘model_name’

SQL Server
EXECUTE my_stored_procedure @model_name
where $1 was my parameter called ‘model_name’

TIP: Replace $1 with @parameter_name for SQL Server queries with parameters.

In case others find this post in the future you need to use a ? mark for MySql (instead of $1 or @parameter_name) queries with parameters.

If you want more functionality we offer this well supported plugin: SQL Database Connector Pro Plugin | Bubble

Documentation here: Introduction - SQL Database Connector Pro

3 Likes