Re: [GENERAL] Error in crosstab using date_trunc

2009-12-06 Thread Scott Marlowe
2009/12/6 José María Terry Jiménez : > > Thank you very much. This worked, also worked with ' instead $outer$ BUT > escaping the ' in minute with two of them  ' 'minute' '. > > What does $outer$ or when i must use it? It's a type of quoting... Take a look here: http://www.postgresql.org/docs/8.3

Re: [GENERAL] Error in crosstab using date_trunc

2009-12-06 Thread José María Terry Jiménez
Alban Hertroys escribió: On 6 Dec 2009, at 4:13, Scott Marlowe wrote: On Sat, Dec 5, 2009 at 12:11 PM, Jose Maria Terry Jimenez wrote: Hello all, I'm trying to do a crosstab from data that row names are times. These times are timestamps and i want to use they truncating to minute

Re: [GENERAL] Error in crosstab using date_trunc

2009-12-06 Thread José María Terry Jiménez
Scott Marlowe escribió: On Sat, Dec 5, 2009 at 12:11 PM, Jose Maria Terry Jimenez wrote: Hello all, I'm trying to do a crosstab from data that row names are times. These times are timestamps and i want to use they truncating to minutes this works for me: select distinct date_trunc('mi

Re: [GENERAL] Error in crosstab using date_trunc

2009-12-06 Thread José María Terry Jiménez
Richard Broersma escribió: On Sat, Dec 5, 2009 at 11:11 AM, Jose Maria Terry Jimenez wrote: select distinct date_trunc('minute',"timestamp") as "timestamp" from historico order by "timestamp"; Notice the example from the documentation: http://www.postgresql.org/docs/8.4/interactive/f

Re: [GENERAL] Error in crosstab using date_trunc

2009-12-06 Thread Alban Hertroys
On 6 Dec 2009, at 4:13, Scott Marlowe wrote: > On Sat, Dec 5, 2009 at 12:11 PM, Jose Maria Terry Jimenez > wrote: >> Hello all, >> >> I'm trying to do a crosstab from data that row names are times. >> >> These times are timestamps and i want to use they truncating to minutes >> this works f

Re: [GENERAL] Error in crosstab using date_trunc

2009-12-05 Thread Scott Marlowe
On Sat, Dec 5, 2009 at 12:11 PM, Jose Maria Terry Jimenez wrote: > Hello all, > > I'm trying to do a crosstab from data that row names are times. > > These times are timestamps and  i  want to  use they truncating to minutes >  this works for me: > > select distinct date_trunc('minute',"timestamp"

Re: [GENERAL] Error in crosstab using date_trunc

2009-12-05 Thread Richard Broersma
On Sat, Dec 5, 2009 at 11:11 AM, Jose Maria Terry Jimenez wrote: > select distinct date_trunc('minute',"timestamp") as "timestamp" from > historico order by "timestamp"; Notice the example from the documentation: http://www.postgresql.org/docs/8.4/interactive/functions-datetime.html#FUNCTIONS-DA