| От | Stephan Szabo |
|---|---|
| Тема | Re: Cast NULL into Timestamp? |
| Дата | |
| Msg-id | 20041210164721.A87803@megazone.bigpanda.com обсуждение исходный текст |
| Ответ на | Cast NULL into Timestamp? (Wei Weng <wweng@kencast.com>) |
| Список | pgsql-sql |
On Fri, 10 Dec 2004, Wei Weng wrote: > I have a table > > create table temp > ( > tempdate timestamp, > tempname varchar(10) > ); > > And I tried to insert the following: > > insert into table temp (tempname, tempdate) > select distinct 'tempname', null from some_other_relevant_table; > > And I got an error that says "column "tempdate" is of type timestamp ... but > expression is of type text... will need to rewrite or cast the expression". > > I really need the distinct. Is there anyway to cast this NULL into a > timestamp or any other workarounds? CAST(NULL as timestamp) should work.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера