Can function return multiple values.
for example
mytable
Col1 (char) col2 (numeric) col3 Date
In my fuction I am casting all 3 columns to character seperated by delimeter and then spliting again. Is there better way
Also i have query with a subquery and i want two columns from subquery
what is best way
for example
Select col1, (select sum(Qty1) from table2) as col2, (select sum(Qty2) from table2) as col3 from table1
Here subquery runs twices
i cant write query as
Select col1, (select sum(Qty1), sum(Qty2) from table2) as col1, col2 from table1
i can write query as
Select col1, (select char(sum(Qty1)) || '--' || char(sum(Qty2)) from table2) as coltmp from table1
Then break the coltmp using delimeter '--'
Please write which is better option
Thanks in advance