SQL: Variable column name

Hi Bubblers!
Using the SQL Connector plugin, I’m trying to use parameter for column name, but keep getting an error like this when initializing the query:

What’s weird is that the parameters “@column1_name” and “@column2_name” causes the error, but not “@column3_name”. Here’s my configuration:

Can someone help me figure this out?

I don’t believe parameters can be used for dynamic column names without using complex expressions using things like case statements, schema queries, etc. Probably best to check the documentation for your Home SQL server to see how people deal with this outside of bubble, then see if you can apply it here.

Turns out, that when the column name is a variable, SQL tries to convert it into the same format than it’s value.
So if @column_name is a varchar() and @column_value is int, the interpreter will try to convert the value of the varchar() into an integer which obviously result in an error. Why? I don’t know…

And this is not a Bubble thing since the same error raises when trying on the server directly.