Can we update input variable of sql query by using "select into input-var-name from table name"

Hi Lovish,

You can't use an Input Variable of a SQL query for a table name - the Platform will detect that and disallow it.

Kilian Hekhuis wrote:

Hi Lovish,

You can't use an Input Variable of a SQL query for a table name - the Platform will detect that and disallow it.

Actually i want to assign value in input variable of sql query... So i am using

Select attribute into @input-var-name from tablename;

So it is giving me error input inappropriate.


Can you show the exact error? Like Bruno said in his now deleted answer, make sure you set the "Expand Inline" Property to "Yes". 

As I read your question, it seems you are trying to get a value from the database and put it in an Outystems variable. Is that correct?

If so, you can just select the field that you want in your query and assign it afterwards using an Assign.

In a query on my project we are using "SET @Variable = Select {Table}.[Value] from {Table} where..."

and it works, is something like this that you need?

Filipe Silva wrote:

In a query on my project we are using "SET @Variable = Select {Table}.[Value] from {Table} where..."

and it works, is something like this that you need?

It is giving me the error: incorrect syntax near '=' operator


Lennart Kraak wrote:

As I read your question, it seems you are trying to get a value from the database and put it in an Outystems variable. Is that correct?

If so, you can just select the field that you want in your query and assign it afterwards using an Assign.

Can you please send me the syntax


Kilian Hekhuis wrote:

Can you show the exact error? Like Bruno said in his now deleted answer, make sure you set the "Expand Inline" Property to "Yes"

Did not work. Any other alternative? I think we can not use pl/ sql in advance sql query. My scenario is the calculation of next data depends on the previous data. So i want to store the previous into variable. "Select attr-name into @var from table-name" is the only syntax i know but it doesn't seems to work.

Hi Lovish,


Can you share first from where you are attempting this action? I don't see this as something you are doing in advance SQL query action.


- Emman