Good morning,
Could someone tell me the command to get the weekly day name and day
number please.
I am expecting something like:
sql> select data_part('day name', current_date);
sql> Monday
sql> select data_part('day number', current_date);
sql> 1
(Mon =1 ... Sun =7?)
Thanks a lot!
--
Se
Emi Lu написа:
Good morning,
Could someone tell me the command to get the weekly day name and day
number please.
I am expecting something like:
sql> select data_part('day name', current_date);
sql> Monday
sql> select data_part('day number', current_date);
sql> 1
(Mon =1 ... Sun =7?)
You
Hello
use to_char function
postgres=# select to_char(current_date, 'day');
to_char
---
wednesday
(1 row)
postgres=# select extract(dow from current_date);
date_part
---
3
(1 row)
regards
Pavel
2008/7/30 Emi Lu <[EMAIL PROTECTED]>:
> Good morning,
>
> Could someone
Emi Lu wrote:
Good morning,
Could someone tell me the command to get the weekly day name and day
number please.
I am expecting something like:
sql> select data_part('day name', current_date);
sql> Monday
sql> select data_part('day number', current_date);
sql> 1
(Mon =1 ... Sun =7?)
Thank
I am expecting something like:
sql> select data_part('day name', current_date);
sql> Monday
sql> select data_part('day number', current_date);
sql> 1
(Mon =1 ... Sun =7?)
Thanks a lot!
http://www.postgresql.org/docs/current/static/functions-formatting.html
This is exactly what I am look
Hi,
I'm relatively new to object oriented databases and postgres (~ 4
months), so I'm not sure what is wrong with my custom aggregate
function. I'm using Postgres 8.3.3 (results are same on Windows and
Ubuntu versions).
Here is my data required to explain my problem:
Michael Toews wrote:
Now, I would like to group a summary of the strings in "sub", but they
must be ordered alphabetically. Here I attempt the SQL:
select commacat(sub), grp from aggr_test group by grp;
However, on my system it will output the "commacat" column as:
"one, two, three";"pom
Richard Huxton <[EMAIL PROTECTED]> writes:
> Michael Toews wrote:
>> This is where I get confused, since in the aggregate function, I have
>> specified `SORTOP="<"`, which according to the documentation
>> (http://www.postgresql.org/docs/8.3/interactive/sql-createaggregate.html)
>> "must be equi
Richard Huxton wrote:
>
> Failing that, where I've had many (a dozen) different sources but want
> to search them all I've built a textsearch_blocks table with columns to
> identify the source and have triggers that keep it up to date.
Once you've built the text search blocks table, how do you s
Ryan Wallace wrote:
Richard Huxton wrote:
Failing that, where I've had many (a dozen) different sources but want
to search them all I've built a textsearch_blocks table with columns to
identify the source and have triggers that keep it up to date.
Once you've built the text search blocks tabl
10 matches
Mail list logo