Esql/c and OUTER JOIN
Posted in 2004
Hi !
well another problem...
it's going to make me crazy.
This doesn't work =>
i get a -1213 error ...
if i replace the sql variable in the declare process : by arbitrary value
... it works.
But for now, as i open the cursor => -1213...
Is there any limitation for number of OUTER join that is used in a query in
sqlc ??
with one join it works, two it works
Then this is a modified version of our request that contains 8 Join (i know
it's a lot, but in this case , it is not performance purpose but retrieving
a lot of data with correpondance.
I 've rewritten this query with only join and that OK, but that's the easier
case to understand that i can provide t you, that create the -1213 error
....
Or maybe it's a misconfigured database ??
Anyway, thk for reading until here :)
and thks for any answer...:)
Arnaud
===================
exec sql declare complet_curseur cursor for
select l.num_libelle, l.lng_max,
nvl(ll1.text,' '),
nvl(ll2.text,' '),
nvl(ll3.text,' ')
from large l LEFT OUTER JOIN large_det ll1
ON ll1.num_libelle = l.num_libelle and ll1.id_langue =:large_det.id_langue
LEFT OUTER JOIN large_det ll2
ON ll2.num_libelle = l.num_libelle and ll2.id_langue = '#'
LEFT OUTER JOIN large_det ll3
ON ll3.num_libelle = l.num_libelle and
ll3.id_langue = :large_det.id_langue
where l.categorie = :large.categorie;
======================= SCHEMA =============
large:
{
num_libelle decimal(32,0)
categ decimal(32,0)
descript varchar(40,0)
}
large_det
{
num_libelle decimal(32,0)
id_langue varchar(5,0)
text varchar(255)
trad decimal(32,0)
}
===================