Page 1 of 1

Getting field expression for aliased fields

Posted: Mon 20 May 2019 07:51
by sasa.pikija
Is it possible to get field "Expression" from SQL query with Unidac for fields that have AS ...? (Oracle, PostgreSQL, Firebird)

For example:
SELECT CASE WHEN State='F' THEN 'Foreign' ELSE ' Domestic' END AS StateText, Substr(Name,1,20) AS PartOfName FROM <SomeTable>

When I read field names i got: StateText and PartOfName.
I would like to get text for aliased field:
1. for StateText : CASE WHEN State='F' THEN 'Foreign' ELSE ' Domestic' END
2. for PartOfName : Substr(Name,1,20)

Thanks.

Re: Getting field expression for aliased fields

Posted: Tue 21 May 2019 08:43
by MaximG
The discussed functionality is not related to the behavior of our products. The syntactic analysis of an SQL query is conducted on your DB server and the possibility of getting the required expression is defined by your server.