How to separate two functions in a Oracle query?
What else can be used other than || ' -- '|| to use more than one function in a query?
For e.g.: SELECT RTRIM(ACCOUNT_ID) || ' -- '|| length (account_id) from tblaccount;
as RTRIM and LENGTH are functions so there has to be something in between like || ' -- '||
for this query in order to run.
As below query which has nothing between RTRIM and LENGTH
SELECT RTRIM(ACCOUNT_ID) length (account_id) from tblaccount;
Gives ERROR: 'FROM keyword not found where expected'
VulpesPosted Mar 14, 2011, 6:59 AM
See if the following will work:
SELECT CONCAT(RTRIM(account_id), CONCAT('--', TO_CHAR(LENGTH(account_id))) from tblaccount
Syed Arbab AhmedPosted Mar 15, 2011, 3:38 AM
Thanks for your guidance.