| От | Eric G. Miller |
|---|---|
| Тема | Re: SELECT MAX question |
| Дата | |
| Msg-id | 20010331215650.B678@calico.local обсуждение |
| Ответ на | SELECT MAX question ("Jacob" <Jay@cob.com>) |
| Список | pgsql-general |
On Sat, Mar 31, 2001 at 09:11:39PM -0500, Jacob wrote: > I have an sql tatement in my ASP page that has a WHERE date = (SELECT > MAX(other_date) FROM SomeTable WHERE Blah1 = Blah2) clause. What's > happening is that the query is grabbing the latest date ONLY if > something something is in the "other_date" field. If the "other_date" > field is blank, then the record is not chosen. My question is, how do > I grab the latest date of "other_date" even if the it happens to be > blank? Think about what you're asking. How can anything or anybody know whether or not a NULL date is greater than some other date? Maybe you want to look into having a timestamp with a default of CURRENT_TIMESTAMP? -- Eric G. Miller <egm2@jps.net>
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера