From: | frederic massot <frederic(at)juliana-multimedia(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | SQL syntax |
Date: | 2002-08-06 15:29:16 |
Message-ID: | 3D4FEB4C.3D4D06ED@juliana-multimedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello,
I have a table containing the months of the year :
travail=> select * from mois order by id_mois;
id_mois|mois_fr |mois_en |mois_de
-------+---------+---------+---------
1|Janvier |January |Januar
2|Fevrier |February |Februar
3|Mars |March |Marz
4|Avril |April |April
5|Mai |May |Aber
6|Juin |June |Juni
7|Juillet |July |Juli
8|Aout |August |August
9|Septembre|September|September
10|Octobre |October |Oktober
11|Novembre |November |November
12|Decembre |December |Dezember
(12 rows)
And I try to obtain for one month given (for example August : 8) two
previous months, the current month, and nine next months :
id_mois|mois_fr |mois_en |mois_de
-------+---------+---------+---------
6|Juin |June |Juni
7|Juillet |July |Juli
8|Aout |August |August
9|Septembre|September|September
10|Octobre |October |Oktober
11|Novembre |November |November
12|Decembre |December |Dezember
1|Janvier |January |Januar
2|Fevrier |February |Februar
3|Mars |March |Marz
4|Avril |April |April
5|Mai |May |Aber
Do you see how making in a SQL request ?
Thank you.
--
==============================================
| FREDERIC MASSOT |
| http://www.juliana-multimedia.com |
| mailto:frederic(at)juliana-multimedia(dot)com |
===========================Debian=GNU/Linux===
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2002-08-06 15:45:45 | Re: problem fetching currval of sequence |
Previous Message | Oleg Bartunov | 2002-08-06 15:28:20 | Re: Transitive Closure |