String constants must be in quote .Error Execute Query. Part II

Hi, I’m having problems again when passing a variable through a query, the other time it was for a blank space, but now I can’t find the problem.
I have the query that I attach, it works correctly passing dates to it, now I want to pass the variable “Monday” and “Friday” but it gives me an error. It is a process that will be launched on Fridays, I work with Oracle.
Lunes = now.AddDays (-5) .ToString (“dd / MM / yyyy”)
Viernes = Now.ToString (“dd / MM / yyyy”)

‘"+ Lunes +"’
‘"+ viernes +"’

It tells me that string constants have to end in double quotes.

Thanks.

Hi @Aguirre

Please remove the empty lines and line break and write the string in one line.

Ex :
Instead of “select
*
From
Table name”

Use

“Select * from Table name”

The error is due to the line break and not with the variable passing.

It does not allow line breaks.

Thanks

Hello, that was the error, but it generates a doubt, my query worked with line breaks and dates, does this mean that whenever I use variables, the entire sentence must be in a single line?
I had it in several since it was quite large.

Very thanks

@Aguirre are you using this inside the execute query activity directly or assigning this first using assign and then pass the variable into the execute query.

Thanks

First I assign the date to “Lunes” and then “Lunes” I pass it through the query

Try to assign the query to a variable and pass the variable into the execute query activity,if thats not working we have to write it in a single line.

Thanks

understood, thank you very much.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.