Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DW sends wrong select to Oracle

13 views
Skip to first unread message

kazelot

unread,
Oct 8, 2003, 3:56:33 AM10/8/03
to

In PB8.03 Build 970 I have a datawindow with select:
SELECT '0' || SUBSTR (id_numery, 1, 9 - LOG (10, :al_krotnosc)) as numer
FROM clientdba.usluga_podstawowa UP, wsdba.linie l, wsdba.numery n
WHERE UP.id_abonent = :al_id_abonent
AND l.id_up = UP.id_usluga_podstawowa
AND l.id_numery = n.ID
AND n.nr_stan = 3
GROUP BY SUBSTR (id_numery, 1, 9 - LOG (10, :al_krotnosc))
HAVING COUNT (*) = :al_krotnosc

On retrieve I have ORA-00979: not a GROUP BY expresion.

I traced the sql sent to the database and it looks like this:

SELECT '0' || SUBSTR (id_numery, 1, 9 - LOG (10, 10)) as numer
FROM clientdba.usluga_podstawowa UP, wsdba.linie l, wsdba.numery n
WHERE UP.id_abonent = :al_id_abonent
AND l.id_up = UP.id_usluga_podstawowa
AND l.id_numery = n.ID
AND n.nr_stan = 3
GROUP BY SUBSTR (id_numery, 1, 9 - LOG (10, :al_krotnosc))
HAVING COUNT (*) = :al_krotnosc

As you see, PB replaced first occurence of :al_krotnosc with retrieval
argument's value but
left other occurences unchanged. What's this? Is it a bug? Or is it some
limitation of PB
that I am not aware of?

Thank you,
kazelot


0 new messages