Re: Cast NULL into Timestamp?
| От | Frank Bax |
|---|---|
| Тема | Re: Cast NULL into Timestamp? |
| Дата | |
| Msg-id | 5.2.1.1.0.20041211115940.02eca9a0@pop6.sympatico.ca обсуждение исходный текст |
| Ответ на | Re: Cast NULL into Timestamp? (Josh Berkus <josh@agliodbs.com>) |
| Список | pgsql-sql |
At 12:11 AM 12/11/04, Josh Berkus wrote: >Wei, > > > insert into table temp (tempname, tempdate) > > select distinct 'tempname', null from some_other_relevant_table; > >I don't think you're reporting the error exactly as it happened. Try cutting >and pasting your actual PSQL session into your e-mail. > >Perhaps you are mixing up the column order? A copy/paste certainly would have been helpful in this case. There are several problems with the above query. 1) the keyword 'table' is not part of insert command. 2) If 'tempname' is a fieldname, it should not have single quotes. 3) NULL doesn't seem to work as expression in select. If (3) is the real problem here, then either solution proposed by Steve/Stephan will work.
В списке pgsql-sql по дате отправления: