How i can interpret the quotes inside the querry?

I tried to put a name for my columns with spaces, and because of delimitation of the string in the Execute Query activity with “”, it gives me error of the syntax.

The querry i want it to process is something like that:

Select Column1 as “Column 1”,
Column2 as “Column 2”
FROM TABLE

Please help me with that :smiley:. Thank you in advance!

@CristinaAlina Try with giving two double quotes ““Column 1”” and let me know

I tried but same error :frowning:.

"Compiler error(s) encountered processing expression ""Select Column1 as ““Column 1"”,…”

Anyone??? :worried:

@CristinaAlina
Had you tried single quote already and surrounding the entire query String with Double quotes?

DoubleQuotedString.xaml (5.1 KB)

Yes, i did. Same thing :frowning:

Yeah i did that too :frowning: not successful

@CristinaAlina
Can you Post for us a Detailed Screenshot from the Activity settings and a Detailed one from the Statement Expression box. Thanks

Following works just fine…
image

Tested with MS SQL

Cheers

@CristinaAlina

why don’t you use [Column 1] instead of column 1

Select [Column 1] from [Sheet1$]


This is the configuration I made for this, and the querry… for now it’s working but with the name of the columns with “_”.

Because the syntax in Oracle SQL Developer, it must be with “” to do that :frowning:.

I tried. In Oracle SQL Dev it’s not working with ’ ’ :disappointed_relieved:

This also works - with MS SQL
image

Cheers

I came back with the solution :smiley::blush: !
In UiPath Studio, for Oracle SQL Developer, it’s not working directly with " “, or “” “”, or [ ], so i tried a trick. :smiley:
I formatted the text with Assign activity, where i assign to a string variable my query in a string with ex: REEL_ID as my alias for the first column. Then, i used the Replace activity to replace REEL_ID with “”“REEL ID””" (yeah, it worked with 3 quotes!), with input and output my variable for formatted text… and it’s worked! :slight_smile:

Cheers :beers:

1 Like

Cool!
In fact the 3 quotes in your replacement string are a single quote

  • first quote is start of string
  • 2nd quote is escape character
  • 3rd quote is just the quote

So if you write your SQL command in assign activity with 2 quotes (like show in my screen shot) it should work as well. Unfortunately I have no Oracle to test :frowning:

I tried it for you, but it didn’t work :frowning:. I put in the assign in query string ““REEL_ID””, then i tried to replace it with “REEL ID” and after that, i tried to replace with “”“REEL ID”“”, and as the result in the both tests, the column remains with REEL_ID.
Anyway, thank you for the implication. :slightly_smiling_face: If you have another ideas to try them let me know. :+1:

Just for my curiosity - could you share how your assign expression looks like?

Like this:

The whole query is in a continuous line in the string.