Article View: borland.public.interbase.sql
Article #1018Re: Pls help with procedure
From: Karol Bieniaszewski
Date: Fri, 09 Mar 2007 13:00
Date: Fri, 09 Mar 2007 13:00
56 lines
2653 bytes
2653 bytes
U�ytkownik "Darius Evseicikas" <dariuse@progmera.lt> napisa� w wiadomo�ci news:45f12ed6@newsgroups.borland.com... > Hello, > > I need to make the procedure > > CREATE PROCEDURE ANGELE_4 ( > NUO DATE, > IKI DATE) > RETURNS ( > OBJEKTAS VARCHAR (100), > METAI INTEGER, > MENUO INTEGER, > MODELIU_SK INTEGER) > AS > BEGIN > for select objektai.pavad, extract (year from pard2.dok_data), extract > (month from pard2.dok_data) > from pard2 > left join kontrahentai objektai on (kontrahentai.id = > pard2.obj_id) > where (pard2.dok_data between :NUO and :IKI) and objektai.tipas = > 5 > group by 1,2,3 > into :objektas, :metai, :menuo > do begin > suspend; > end > END > > But I can't to group selected fields, how I can to write the group section > ? > > -- > Pagarbiai > Darius Evseicikas > ================== > UAB "PROGMERA" > Maironio g. 3, LT-60149, Raseiniai > tel./faks. +370 428 70329 > mob. +370 699 97390 > ICQ 297832308 > > Informacija �iame prane�ime gali b�ti konfidenciali. Ji skirta tik > asmeniui, kuriam yra adresuota. Jei J�s nesate tas asmuo (arba atsakingas > u� �io prane�imo pristatym� tam asmeniui), J�s negalite skaityti, > kopijuoti ar bet kaip platinti �io prane�imo viso ar i� dalies ir skleisti > jame esan�ios informacijos. Jei �� prane�im� gavote per klaid�, pra�ome > informuoti apie tai siunt�j� ir i�kart i�trinti visas �io prane�imo > kopijas i� J�s� sistemos. why you need group by if you not use any agregate function? Use order by in this case if you reale not need group by. Karol Bieniaszewski
Technical Details
Message-ID:
<45f159bc@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45f12ed6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,90802e9148f8740b X-Google-Attributes: gid114a0e,public X-Google-Language: LITHUANIAN,CP1257 From: "Karol Bieniaszewski" <liviuslivius@poczta.onet.pl> Newsgroups: borland.public.interbase.sql References: <45f12ed6@newsgroups.borland.com> Subject: Re: Pls help with procedure Date: Fri, 9 Mar 2007 14:00:24 +0100 Lines: 58 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 NNTP-Posting-Host: 83.19.119.182 Message-ID: <45f159bc@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1173445052 83.19.119.182 (9 Mar 2007 04:57:32 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail