[SQL] Convert INT to INTERVAL?

2004-02-27 Thread Brian Knox
Is it possible within pl/pgsql, to convert an integer to an interval in months? IE, if num_months is an INT set to 48, can it be converted to an interval? Thanks, Brian ---(end of broadcast)--- TIP 7: don't forget to increase your free space map se

Re: [SQL] Date Foo.

2004-02-20 Thread Brian Knox
not away of what months the interval spans, so there'd be no proper way to take month lengths into account. I gave up on the sql and used Date::Calc from Perl. Thanks for your answer anyway. scott.marlowe wrote: On Thu, 19 Feb 2004, Brian Knox wrote: ( sorry if this is a repeat, my mail

Re: [SQL] DISTINCT ON troubles

2004-02-19 Thread Brian Knox
( sorry if this is a repeat, my mail server is being wonky today ) I'm looking for a way, within SQL, given a starting date and an ending date, to get back the number of months between the start and end date. If I "SELECT end_date - start_date", I get back an interval in days; I need months. T

Re: [SQL] "record" datatype - plpgsql

2003-05-30 Thread Brian Knox
That's not what I was asking. I know I can access the values of each column using NEW.columnname. What I was asking is if there's anyway to use the NEW record to get a list of the columnnames in it without knowing them beforehand. Brian Knox On Thu, 29 May 2003, George Weaver wrote:

[SQL] "record" datatype - plpgsql

2003-05-30 Thread Brian Knox
Given a variable of the "record" data type in pl/pgsql, is it possible to get the names of the columns ( attributes ) of that record? eg, given record "NEW" for table "foo", is there a way to get information concerning the columns that ma

Re: [SQL] How To Recover Deleted Data

2003-05-30 Thread Brian Knox
Do you have a backup of the data? Brian Knox Senior Systems Programmer Web Infrastructure and Security x51613 [EMAIL PROTECTED] On Thu, 29 May 2003, Abdul Wahab Dahalan wrote: > I've accidentally deleted the data in my table. So How to recover it back. > > > -