Page 1 of 1
Use variable in 'SQL Query to CSV File'
Posted: Tue Jan 28, 2025 10:57 am
by sarnusch
Good morning,
I am trying to use a variable ({STORE}) with an integer value in 'SQL Query to CSV File' action.

- Screenshot 2025-01-28 105217.png (6.96 KiB) Viewed 63256 times
But it always shows an error:

- Screenshot 2025-01-28 105131.png (7.09 KiB) Viewed 63256 times
It seems that variables are not working in 'SQL Query to CSV File' action.
The same setup works fine in 'Dataset Loop' action.
Can you please investigate?
Re: Use variable in 'SQL Query to CSV File'
Posted: Tue Jan 28, 2025 11:30 am
by Oleg
Thank you for the report. It seems this is a bug. We'll fix it
Now you can include RoboTask variables directly in SQL expression
For example:
Code: Select all
select * from addr where locked = {num}
Re: Use variable in 'SQL Query to CSV File'
Posted: Thu Apr 03, 2025 4:40 am
by LucasGaines
Has the admin fixed the core yet. My screen still shows the error.
Re: Use variable in 'SQL Query to CSV File'
Posted: Thu Apr 03, 2025 1:34 pm
by Oleg
LucasGaines wrote: ↑Thu Apr 03, 2025 4:40 am
Has the admin fixed the core yet. My screen still shows the error.
This problem has been fixed in version 10.3 (current version)
Re: Use variable in 'SQL Query to CSV File'
Posted: Sat Jul 25, 2026 9:22 am
by David Brown1331
I’m trying to stick a variable ({STORE}) that has just a number into the SQL Query to CSV File action, but it keeps throwing an error no matter what I do. Weird thing is the exact same variable works fine when I use it in Dataset Loop. Not sure if variables just don’t work in that SQL-to-CSV step or if I’m doing something wrong.
Re: Use variable in 'SQL Query to CSV File'
Posted: Tue Aug 04, 2026 11:20 am
by Oleg
Send your task to me in private message or publish the text of your task here.
It's hard to say anything without your task