Page 1 of 2

ORA-01008: not all variables bound

Posted: Sat Feb 01, 2014 7:07 pm
by katsifos
Hello .
I am using the odp provider for oracle.
In sql editor i parse the statement :

SELECT s.id,
s.EPONYMIA,
kat.DNSH,
kat.POLH,
s.EPAGGELMA,
s.AFM,
kat.THL1,
NVL (tz.res, 0) AS res
FROM SUPL s,
SUPL_KATASTHMATA Kat,
( SELECT SUM (RES) AS res, ID_PELATH
FROM (SELECT ID_PELATH,
CR_DATE,
CASE
WHEN -1 = :p3
THEN
(PEL_XREOSI - PEL_PISTOSI) * SUNOLO
WHEN 0 = :p3
THEN
(PEL_XREOSI - PEL_PISTOSI)
* (AJIA_FPA_0 + KATHARO_0)
WHEN 1 = :p3
THEN
(PEL_XREOSI - PEL_PISTOSI)
* (AJIA_FPA_1 + KATHARO_1)
WHEN 2 = :p3
THEN
(PEL_XREOSI - PEL_PISTOSI)
* (AJIA_FPA_2 + KATHARO_2)
else
0
END
res
FROM ALL_PARASTATIKA
INNER JOIN P_L_M
ON (ALL_PARASTATIKA.ID = ID_PARASTATIKOY)
INNER JOIN ANALISI_ANA_FPA_GR_L2
ON (P_L_M.ID = ID_MASTER)
WHERE NOT EXISTS
(SELECT 'x'
FROM P_L_MA
WHERE P_L_MA.ID_MASTER = P_L_M.id)
UNION ALL
SELECT ID_PELATH,
CR_DATE,
CASE
WHEN -1 = :p3
THEN
(PEL_XREOSI - PEL_PISTOSI) * SUNOLO
WHEN 0 = :p3
THEN
(PEL_XREOSI - PEL_PISTOSI)
* (AJIA_FPA_0 + KATHARO_0)
WHEN 1 = :p3
THEN
(PEL_XREOSI - PEL_PISTOSI)
* (AJIA_FPA_1 + KATHARO_1)
WHEN 2 = :p3
THEN
(PEL_XREOSI - PEL_PISTOSI)
* (AJIA_FPA_2 + KATHARO_2)
else
0
END
res
FROM ALL_PARASTATIKA
INNER JOIN P_X_M
ON (ALL_PARASTATIKA.ID = ID_PARASTATIKOY)
INNER JOIN ANALISI_ANA_FPA_GR_X2
ON (P_X_M.ID = ID_MASTER)
WHERE NOT EXISTS
(SELECT 'x'
FROM P_X_MA
WHERE P_X_MA.ID_MASTER = P_X_M.id))
WHERE TRUNC (CR_DATE) BETWEEN ( :d1) AND TRUNC ( :d2)
GROUP BY ID_PELATH) tz
WHERE s.ID = Kat.ID_PROMHTHEYTH
AND S.ID = Tz.ID_PELATH(+)
AND KAT.IS_EDRA = 1
AND S.IS_DEFAULT_L = 0

as i copy it from toad and it executes correctly with 3 variables
:p3 int
:d1 date
:d2 date
in toad
did the same in sti sql editor but it throws me ta error.

Any Actions ?
Best Regards
Aris

Re: ORA-01008: not all variables bound

Posted: Mon Feb 03, 2014 5:57 am
by Alex K.
Hello,

Can you please send us your report for analysis.

Thank you.

Re: ORA-01008: not all variables bound

Posted: Mon Feb 03, 2014 8:32 am
by katsifos
In attachment i use that report.
Regards

Re: ORA-01008: not all variables bound

Posted: Mon Feb 03, 2014 10:27 am
by Alex K.
Hello,

Please try to set the default value for parameters.

Thank you.

Re: ORA-01008: not all variables bound

Posted: Mon Feb 03, 2014 3:46 pm
by katsifos
still getting same error.
is something setting wrong ?

Thanks in advanced

Re: ORA-01008: not all variables bound

Posted: Tue Feb 04, 2014 12:27 pm
by Alex K.
Hello,

Can you please send us a sample query for create a objects in database and sample report which reproduce the issue for analysis.

Thank you.

Re: ORA-01008: not all variables bound

Posted: Tue Feb 04, 2014 6:51 pm
by katsifos
I am uploading the referent tables in query.
Best Regards.

Re: ORA-01008: not all variables bound

Posted: Wed Feb 05, 2014 8:40 am
by Alex K.
Hello,

Please check your query in sql editor (pl/sql), we could not run your query even without parameters.

Re: ORA-01008: not all variables bound

Posted: Wed Feb 05, 2014 12:52 pm
by katsifos
sorry the schema had some erros here is an new export only for the needed query in anothet test schema.

Re: ORA-01008: not all variables bound

Posted: Wed Feb 05, 2014 1:00 pm
by Andrew
Hello,

It seems you forgot to upload a new file.

Thank you.