Article View: borland.public.interbase.sql
Article #1022Re: Pls help with procedure
From: harun bolat
Date: Sat, 10 Mar 2007 07:26
Date: Sat, 10 Mar 2007 07:26
47 lines
2650 bytes
2650 bytes
You can use DISTINCT keyword
for select DISTINCT 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
"Darius Evseicikas" <dariuse@progmera.lt>, haber iletisinde �unlar�
yazd�:45f25768@newsgroups.borland.com...
> If I don't use the group I select all records, but I need only grouped
> records by objektas, year, month
>
> --
> 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.
> "Bill Todd" <no@no.com> wrote in message
> news:45f17701$1@newsgroups.borland.com...
>> Darius Evseicikas wrote:
>>
>>> But I can't to group selected fields, how I can to write the group
>>> section ?
>>
>> There is nothing to group. To use GROUP BY you must have at leas one
>> aggregate function (MIN, MAX, COUNT, SUM, etc.) in the SELECT clause.
>> If you want the result in a particular order use ORDER BY.
>>
>> --
>> Bill Todd (TeamB)
>
>
Technical Details
Message-ID:
<45f25c19@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45f12ed6@newsgroups.borland.com> <45f17701$1@newsgroups.borland.com> <45f25768@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,90802e9148f8740b X-Google-Attributes: gid114a0e,public X-Google-Language: ENGLISH,ASCII From: "harun bolat" <harunbolat@netsim.net> Newsgroups: borland.public.interbase.sql References: <45f12ed6@newsgroups.borland.com> <45f17701$1@newsgroups.borland.com> <45f25768@newsgroups.borland.com> Subject: Re: Pls help with procedure Date: Sat, 10 Mar 2007 09:26:03 +0200 Lines: 49 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; Response NNTP-Posting-Host: 212.174.130.50 Message-ID: <45f25c19@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1173511193 212.174.130.50 (9 Mar 2007 23:19:53 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail