Article View: borland.public.cppbuilder.database.multi-tier
Article #13hm, is it a SQL- Problem ? I think "UNION ALL" is the reason. -> a bug ?
From: wegmann
Date: Wed, 27 Aug 2003 11:55
Date: Wed, 27 Aug 2003 11:55
77 lines
3359 bytes
3359 bytes
The other queries don't have this Problem.
So I tried another SQL- Syntax.
The next SQL- Statement does work:
-------------------- SQL
select k.nrdispo,k.nrmandant
FROM admin.sd_kombi_prod k,
admin.ep_gfk_ratings r,
admin.ep_potentiale p,
admin.sd_user u,
admin.sd_user_kunde uk,
admin.ep_disp_faktor df
WHERE k.wb_id = r.wb_id(+)
AND k.nrkunde=uk.nrkunde
AND u.id_user=uk.id_user
AND u.id_user=9
AND k.datum = p.datum
AND k.sender_id= df.sender_id(+)
AND k.datum BETWEEN df.dat_von (+) AND df.dat_bis (+)
AND k.spotdauer BETWEEN df.min_sek(+) AND df.max_sek (+)
AND k.datum <= (SELECT MAX(datum) FROM ADMIN.Ep_Gfk_Inseln)
and k.nrdispo=426283
-------------------- SQL
The field "nrmandant" (an Integer) is shown right.
This SQL- Statement dosen't work how I want. The ClientDataSet can't work
with it:
-------------------- SQL
select k.nrdispo,k.nrmandant
FROM admin.sd_kombi_prod k,
admin.ep_gfk_ratings r,
admin.ep_potentiale p,
admin.sd_user u,
admin.sd_user_kunde uk,
admin.ep_disp_faktor df
WHERE k.wb_id = r.wb_id(+)
AND k.nrkunde=uk.nrkunde
AND u.id_user=uk.id_user
AND u.id_user=9
AND k.datum = p.datum
AND k.sender_id= df.sender_id(+)
AND k.datum BETWEEN df.dat_von (+) AND df.dat_bis (+)
AND k.spotdauer BETWEEN df.min_sek(+) AND df.max_sek (+)
AND k.datum <= (SELECT MAX(datum) FROM ADMIN.Ep_Gfk_Inseln)
and k.nrdispo=426283
union all
select k.nrdispo,k.nrmandant
FROM admin.sd_kombi_prod k,
admin.edi_prog_ratings r,
admin.ep_potentiale p,
admin.sd_user u,
admin.sd_user_kunde uk,
admin.ep_disp_faktor df
WHERE k.wb_id = r.wb_id(+)
AND k.nrkunde=uk.nrkunde
AND u.id_user=uk.id_user
AND u.id_user=9
AND k.datum = p.datum
AND k.sender_id= df.sender_id(+)
AND k.datum BETWEEN df.dat_von (+) AND df.dat_bis (+)
AND k.spotdauer BETWEEN df.min_sek(+) AND df.max_sek (+)
AND k.datum > (SELECT MAX(datum) FROM ADMIN.Ep_Gfk_Inseln)
and k.nrdispo=426283
-------------------- SQL
now the field "nrmandant" is shown as an defaultvalue " berlauf" for the
overflow- Error.
Is it a bug ?
How chan I fix my Problems ?
Andreas
Technical Details
Message-ID:
<3f4c9c4e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f4c8fa0@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,be42f7d027d868a4 X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2003-08-27 05:03:30 PST Reply-To: "wegmann" <and.wegmann@t-online.de> From: "wegmann" <and.wegmann@t-online.de> Newsgroups: borland.public.cppbuilder.database.multi-tier References: <3f4c8fa0@newsgroups.borland.com> Subject: hm, is it a SQL- Problem ? I think "UNION ALL" is the reason. -> a bug ? Date: Wed, 27 Aug 2003 13:55:48 +0200 Lines: 79 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 194.31.245.2 Message-ID: <3f4c9c4e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061985358 194.31.245.2 (27 Aug 2003 04:55:58 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail