🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #1016

Pls help with procedure

#1016
From: Darius Evseicikas
Date: Fri, 09 Mar 2007 09:55
45 lines
2248 bytes
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. 
Technical Details
Message-ID: <45f12ed6@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.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

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,90802e9148f8740b,start
X-Google-Attributes: gid114a0e,public
X-Google-Language: LITHUANIAN,CP1257
From: "Darius Evseicikas" <dariuse@progmera.lt>
Newsgroups: borland.public.interbase.sql
Subject: Pls help with procedure
Date: Fri, 9 Mar 2007 11:55:04 +0200
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 213.190.34.210
Message-ID: <45f12ed6@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1173434070 213.190.34.210 (9 Mar 2007 01:54:30 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.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