[SQL] explicit casts

2011-01-05 Thread Iuri Sampaio
Hi there, I installed postgresql 8.4 on my box and now i have troubles with the following query regarding explicit casts. select to_char(trunc(to_date(:the_date, '-mm-dd'), 'Month'), 'fmMonth') as month, to_char(trunc(to_date(:the_date, '-mm-dd'), 'Month'), '') as year,

Re: [SQL] explicit casts

2011-01-05 Thread Iuri Sampaio
So far, I could write the following query select to_char(trunc(to_date('2010-01-02', '-mm-dd'), 'Month'), 'fmMonth') as month, to_char(trunc(to_date('2010-01-02', '-mm-dd'), 'Month'), '') as year, to_char(trunc(to_date('2010-01-02', '-mm-dd'), 'Month'), 'J') as

Re: [SQL] explicit casts

2011-01-05 Thread Adrian Klaver
On Wednesday 05 January 2011 4:24:34 pm Iuri Sampaio wrote: Hi there, I installed postgresql 8.4 on my box and now i have troubles with the following query regarding explicit casts. select to_char(trunc(to_date(:the_date, '-mm-dd'), 'Month'), 'fmMonth') as month,

Re: [SQL] explicit casts

2011-01-05 Thread Adrian Klaver
On Wednesday 05 January 2011 5:22:30 pm Iuri Sampaio wrote: So far, I could write the following query select to_char(trunc(to_date('2010-01-02', '-mm-dd'), 'Month'), 'fmMonth') as month, to_char(trunc(to_date('2010-01-02', '-mm-dd'), 'Month'), '') as year,