Lexical question...

Поиск
Список
Период
Сортировка
От Net Virtual Mailing Lists
Тема Lexical question...
Дата
Msg-id 20041123103336.27425@mail.net-virtual.com
обсуждение исходный текст
Ответы Re: Lexical question...  ("Net Virtual Mailing Lists" <mailinglists@net-virtual.com>)
Re: Lexical question...  (John DeSoi <desoi@pgedit.com>)
Список pgsql-general
Hello,

I have a table with a timestamp column and I want to set this to a value
of now() - a random number of days between 0 and 45 for each row... I've
tried to do this a bunch of different ways and can't figure it out...
Here is my latest version:


update sometable set entered_dt = now() - interval round(random()*45)||'
days';


Any ideas on the proper way to accomplish this?

Thanks!

- Greg




В списке pgsql-general по дате отправления:

Предыдущее
От: "Joost Kraaijeveld"
Дата:
Сообщение: Bug in queries ??
Следующее
От: "Net Virtual Mailing Lists"
Дата:
Сообщение: Re: null value of type java.sql.Time