|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Learn five alternative approaches for automating the delivery of Excel-based reports. Read all about it in the free whitepaper: “Automating Excel Reports: Five Approaches for Java Developers” Download Now!
|
|
#1
|
|||
|
|||
|
General SQL query
Whats wrong with this query,
I am not able to pass "fiscal_year_period" into "P_fiscal_period", If I comment out that line and remove the comma after "P_pastdue_percentage" everything works fine. SELECT round(((Past_Due/Doc_Num)* 100),2) INTO P_pastdue_percentage, fiscal_year_period INTO P_fiscal_period FROM ( SELECT Count(DOCUMENT_NUMBER) Doc_Num, sum(decode(greatest(trunc(DUE_DATE),trunc(sysdate)),trunc(sysdate),1,0)) Past_Due, fiscal_year_period FROM GETS_GS_AR_AGING_DETAIL WHERE FISCAL_YEAR_PERIOD between '200304' and '200306' AND OPEN_AMOUNT > 0 GROUP BY fiscal_year_period ) TIA Narsi |
|
#2
|
|||
|
|||
|
That looks like Oracle syntax, I believe you have your syntax wrong:
Instead of : select col1 into var1, col2 into var2 it should be: select col1, col2 into var1,var2 |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > General SQL query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|