Skip to Content
0

Create Derived Table

Oct 24, 2017 at 09:51 AM

16

avatar image
Former Member

Hi people

i have query & i need to make a Derived table

& every time i try to create this table i get the same error

"each calculated column must have explicit name"

i tried as & explicit name for the calculated column & i still get the same error

here is the query as i run it in Toad without any changes

(

select A.ACCT_NO,

a.description,

CRNCY.ISO_CODE,

sum(b.cur_bal) cur

from

AD_GB_CRNCY CRNCY,

gl_balances b,

gl_acct a

where

b.GL_ACCT_ID = a.GL_ACCT_ID

and b.CRNCY_ID = crncy.CRNCY_ID

and a.ledger_no in

(select distinct substr(WIP_ACCT_NO,17,13) wp

from

AD_GB_ACCT_TYPE

where DEP_LOAN = 'LN' and acct_type != '196')

group by

A.ACCT_NO,CRNCY.ISO_CODE

,a.description

having sum(b.cur_bal) !=0 order by A.ACCT_NO,CRNCY.ISO_CODE;

)

Thanks in advance

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

AMIT KUMAR
Oct 24, 2017 at 10:09 AM
2

change below part in your sql and try.

(select distinct substr(WIP_ACCT_NO,17,13) as wp

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

thanks but its not working

0

try with adding as in below also.

sum(b.cur_bal) as cur

or to see where exactly is the issue remove your calculated sql one by one and see where it is causing the issue.

0