Subject | AW: [firebird-support] sql error |
---|---|
Author | Olaf Kluge |
Post date | 2013-03-20T10:20:24Z |
Hi,
Thanks you and Paul.
I think it's a problem of ibexpert Version 2009. Although I can select the
fb 2.5 version, but while debugging I get this error. If I execute the sp,
it works.
Before I check the count of any Prio, I have a look for any free storage
compartments.
Thank you for the suggestions.
Best regards.
Olaf
understand the parenthesis at the beginning of line 24 ;o)
From what you've shown so far, I'd change to:
with wgetnextprio as
(select prio, count(*) as kount
from tfachzuordnung
where le is null
and gesperrt = 0
and elementtyp = 1
and paltyp = :paltyp_anfrage
group by prio
order by 2 desc
rows 1)
select prio
from wgetnextprio
into :prio_to_find;
select fachnr
from tfachzuordnung
where le is null
and gesperrt = 0
and elementtyp = 1
and paltyp = :paltyp_Anfrage
and dispo = 0
and prio = :prio_to_find
order by fachnr
rows 1
into :ziel_einl;
(or possibly mix them together if you don't need prio_to_find later). I note
that only the last select includes dispo, I assume you've checked that the
content of ziel_einl is as desired if the record with the highest kount
doesn't have any row with dispo = 0.
HTH,
Set
[Non-text portions of this message have been removed]
Thanks you and Paul.
I think it's a problem of ibexpert Version 2009. Although I can select the
fb 2.5 version, but while debugging I get this error. If I execute the sp,
it works.
Before I check the count of any Prio, I have a look for any free storage
compartments.
Thank you for the suggestions.
Best regards.
Olaf
>But now I get: Token unknown, column 1 line 24 (Without seeing at least 24 lines of code, it is hard to tell why it doesn't
understand the parenthesis at the beginning of line 24 ;o)
>with this code I get an sql error, but it works until today perfect :o(What has changed? Have you upgraded anything?
From what you've shown so far, I'd change to:
with wgetnextprio as
(select prio, count(*) as kount
from tfachzuordnung
where le is null
and gesperrt = 0
and elementtyp = 1
and paltyp = :paltyp_anfrage
group by prio
order by 2 desc
rows 1)
select prio
from wgetnextprio
into :prio_to_find;
select fachnr
from tfachzuordnung
where le is null
and gesperrt = 0
and elementtyp = 1
and paltyp = :paltyp_Anfrage
and dispo = 0
and prio = :prio_to_find
order by fachnr
rows 1
into :ziel_einl;
(or possibly mix them together if you don't need prio_to_find later). I note
that only the last select includes dispo, I assume you've checked that the
content of ziel_einl is as desired if the record with the highest kount
doesn't have any row with dispo = 0.
HTH,
Set
[Non-text portions of this message have been removed]