Re: Modifying selected records

Поиск
Список
Период
Сортировка
От Oliveiros C,
Тема Re: Modifying selected records
Дата
Msg-id D95B19606E8040AC9982940E092AE64B@marktestcr.marktest.pt
обсуждение исходный текст
Ответ на Modifying selected records  (Ruzsinszky Attila <ruzsinszky.attila@gmail.com>)
Ответы Re: Modifying selected records  (Ruzsinszky Attila <ruzsinszky.attila@gmail.com>)
Список pgsql-novice
Well, one way to do it with just sql , AFAIK, at least, is
to use something like (untested)

SELECT  COUNT(query2.*),
query1.all_kod,quey1.nev,query1.megall,query1.erkezik_ido,query1.indul_ido,'910_'
|| COUNT(query2.*)
FROM (/*your query goes here */) query1, (/*and here */) query2
WHERE query1.indul_ido >= query2.indul_ido

Try this out, then tell me if it worked

I'm Assuming that no two trains depart at the same time. Is this true?

Also, be aware that this is quite slow when the output becomes too extense,
and it is suitable only for small outputs.



Best,
Oliveiros

PS- Always include the mailing list in CC, as someone more knowledgeable
than me may help you faster and/or better



----- Original Message -----
From: "Ruzsinszky Attila" <ruzsinszky.attila@gmail.com>
To: "Oliveiros C," <oliveiros.cristina@marktest.pt>
Sent: Wednesday, September 02, 2009 11:41 AM
Subject: Re: [NOVICE] Modifying selected records


>> Does your output have any kind of order?
> Yes.
>
>> For ex, by the arrival/departure time of the train, or by registration
>> number or something?
> Now: order by indul_ido (means: departure time).
>
>> Is that a big listing? Or it produces just a few dozens records?
> I think no. The give example is 37 records. I think the maximum will be
> 100-150-200 records.
>
> Bye:
> Ruzsi


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Oliveiros C,"
Дата:
Сообщение: Re: Modifying selected records
Следующее
От: Ruzsinszky Attila
Дата:
Сообщение: Re: Modifying selected records