Double Quotes in sql in uipath

Hi,

I have a query which looks like this: select col1,col2 "abc" from table;
Capture

I think it has got to do something with the double quotes for abc .
Any help would be appreciated.

Add another double quote around ““abc”” :slight_smile:

Kindly have a view on this thread

Cheers @hss

@TimK i added, it is giving me an error like: Compiler error : String constants must end with double quote.. not sure where am making the mistake

"select /*parallel(a,16)*/ col1 ""abc"",col2 ""def"" from table where 1=1 and col1='Y' and col2 In ('ww','gg') order by col1,col2"

@Palaniyappan i tried… the assigning to string itself gives me that same error… So am guessing am writing the string incorrectly .

Hi, stupid question: can you write it with single quotes? (select col1,col2 ‘abc’ from table)

what kind of database are you using? is the abc like an alias for the column?

You can use Write Line to look at your Query in the output panel.

Afterwards you can copy the Query and test it in the DB IDE

@bcorrea db is oracle, abc yes is column alias

I have tried the same string in mine and it works - try assign the SQL to a string variable first then use that variable and see if that works for you.

“select /parallel(a,16)/ col1 ““abc””,col2 ““def”” from table where 1=1 and col1=‘Y’ and col2 In (‘ww’,‘gg’) order by col1,col2”

so i think in your case you dont need the quotes and also you can do like this:

SELECT p.product_id, p.product_name, categories.category_name
FROM products p

where p is the alias for the products table…

Double quotes or Square Brackets are required if column alias has a space so depends on that too…

yes, that is why i said in his case he didnt need…