Page 1 of 1

eSQL

Posted: Fri 03 Apr 2009 09:34
by ies
Hi, i'm using eSQL and i have two questions

1.- ?Is possible use UPPER clause?

2.- ?Is possible use CONVERT clause? i want to convert numeric field to string

"SELECT a.FIELD1,a.FIELD2
FROM TABLE as a"

thanks,
________
MERCEDES-BENZ 300SL

Posted: Fri 03 Apr 2009 11:28
by AndreyR
Both UPPER and CONVERT functions can be used in Entity SQL for Oracle.
Please note that you should use prefix "Devart.Data.Oracle", like in the following example:

Code: Select all

ObjectQuery query = new ObjectQuery("Devart.Data.Oracle.UPPER('hello')", context);

Posted: Mon 06 Apr 2009 11:33
by ies
Hi Andrey,

?Can you write a sample using convert?

thanks,
________
Vermont Marijuana Dispensaries

Posted: Mon 06 Apr 2009 14:23
by AndreyR
Here it goes

Code: Select all

ObjectQuery query = new ObjectQuery("Devart.Data.Oracle.CONVERT('Ä Ê Í Ó Ø A B C D E', 'US7ASCII')", context);

Posted: Mon 06 Apr 2009 16:18
by ies
Hi Andrey,

Thanks for your reply. But i have a table with numeric field and i want to convert a numeric value to varchar value, example

TABLE1
FIELD1 VARCHAR2(50)
FIELD2 NUMERIC

I want to do:
"SELECT t.FIELD1,t.FIELD2 from context.TABLE1 as t
WHERE Devart.Data.Oracle.CONVERT(t.FIELD2, 'US7ASCII') like '%a%'"

"No overload of function 'Devart.Data.Oracle.CONVERT' is compatible with the argument types in 'Devart.Data.Oracle.CONVERT(Edm.Int32, Edm.String)'., near function 'CONVERT()'
?Is possible use TO_CHAR?

thanks,
________
GENETICALLY MODIFIED FOOD

Posted: Tue 07 Apr 2009 12:33
by AndreyR
The TO_CHAR function is supported.
We will include the full list of supported functions to our documentation.