Re: [SQL] returning the current date in a SQL query
| От | Bruce Momjian |
|---|---|
| Тема | Re: [SQL] returning the current date in a SQL query |
| Дата | |
| Msg-id | 199808121943.PAA15897@candle.pha.pa.us обсуждение исходный текст |
| Ответ на | Re: [SQL] returning the current date in a SQL query (Dimitri <dimitri@France.Sun.COM>) |
| Список | pgsql-sql |
> I think you have to play with UNION: > > select ... , project_date from tblprojects where title not in ( '[unknown]', > 'pending' ) > UNION ALL > select ... , 'now'::datetime from tblprojects where title = '[unknown]' > UNION ALL > select ... , 'now'::datetime from tblprojects where title = 'pending'; > > It'll be more elegant if you create a VIEW with this query, but > for the moment UNION is not available in VIEWs... > > Hope it helps... > (dim) yes, that is on the TODO list. Not sure it will be in 6.4. Depend on the rewrite system cleanups. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
В списке pgsql-sql по дате отправления: