Re: [SQL] refer a column as a varible name?

2005-09-13 Thread gherzig
Im using pg 8.0. I personally dont have problem in using pl/perl, but none of my companions is a perl programmer, so i guess the IF..THEN seems to be an easy (altough not preferable) solution. Thank you very much Michael. Gerardo > On Mon, Sep 12, 2005 at 12:21:22PM -0300, [EMAIL PROTECTED] wrote

Re: [SQL] SELECT: retrieve only 2 rows next to known row

2005-09-13 Thread Marcin Piotr Grondecki
Dnia Fri, Sep 09, 2005 at 04:23:00PM +0400.424.r. ([EMAIL PROTECTED]), Nikolay Samokhvalov napisal(a): > Hi, > > My knowledge of PostgreSQL's SQL is not good, but I know ISO/ANSI > SQL:2003 (basics) quite well. > > I've encountered with following task. I have one SELECT statement with > ORDER BY

Re: [SQL] How do I convert an integet to a timestamp?

2005-09-13 Thread Eugene E.
Wei wrote: Hi. I followed the doc and tried "select CAST(1126547334 AS timestamp)" and I only got an error response that says: ERROR: cannot cast type integer to timestamp without time zone. What is the proper way to do the conversion? select 123456789::abstime::timestamp; -