var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
cursor l_MSStemplate1 is SELECT B1.BLLSNR, B1.SPERID, SA1.LSTNAM, B1.PAPER, B1.EDITIN, B1.DSTSTA as froday,
B1.DSTSTO, B1.MISCID, B1.FEEKND,(B1.AMOUNT-B1.CMPAMO-B1.CUSDIS) as feeamo, B1.CMPAMO, B1.CUSDIS, B1.VATAMO,
(B1.AMOUNT + B1.VATAMO) as billamount, B1.CHARID, B1****NDAY, B1.DUEDAY as duedate, SA1.FSTNAM, SB1.FSTNAM,
SB1.LSTNAM,B1.CURCOR/100, B1.SUBSID,B1.SUBSNR, decode(mod(B1.PRCPER,1000),0,(B1.PRCPER/1000)||'m',B1.PRCPER || 'd') as PRCPER,
B1.FEETXT, B1.SUBCMP, B1.BLLCOP, B1.BLLCRE, B1.BLLNUM
FROM BILLRSLT B1,SSCRIBER SA1,SSCRIBER SB1
WHERE (B1.BLLCOP=0) AND (B1.BLLCRE=0) AND (B1.RESELL=0) AND (B1.BLLNUM = P_BLNUM ) AND (B1.SPERID=SA1.SPERID)
SELECT B2.BLLSNR, B2.SPERID, SA2.LSTNAM, B2.PAPER, B2.EDITIN, N2.NULDAT, N3.NULDAT, B2.MISCID, B2.FEEKND,
(B2.AMOUNT-B2.CMPAMO- B2.CUSDIS) as feeamo, B2.CMPAMO, B2.CUSDIS, B2.VATAMO,
(B2.AMOUNT + B2.VATAMO), B2.CHARID, B2****NDAY, B2.DUEDAY as duedate, SA2.FSTNAM, SB2.FSTNAM, SB2.LSTNAM, B2.CURCOR/100,
AG2.SCAGID, B2.SUBSNR,'0', B2.FEETXT, B2.SUBCMP, B2.BLLCOP, B2.BLLCRE, B2.BLLNUM
FROM BILLRSLT B2,SSCRIBER SA2,SSCRIBER SB2,SCAGREEM AG2,NULLDATE N2,NULLDATE N3
WHERE (B2.BLLCOP=0) AND (B2.BLLCRE=0) AND (B2.RESELL=1) AND (B2.BLLNUM = p_blnum) AND (B2.SPERID=SA2.SPERID)
AND (B2.CHARID=SB2.SPERID) and (B2.SUBSID=AG2.SCAGID);
I have checked many times in this but could not find where the columns without alias are existing....
Can ne1 tell wat els cn b d prob in dis Select statement.....
What a HORRIBLE!!! formatting! No wonder you can't find the error. In the old days, where there was no GUI with built-in formatters, we formatted code manually. I suggest you to do the same.
Moreover, learn how to use English language. This:
Can ne1 tell wat els cn b d prob in dis
As of your question: there's duplicate FSTNAM column in both SELECT statements.
Tags for this Thread