Re: [SQL] Few Queries

2002-08-19 Thread Sugandha Shah
From: "Richard Huxton" <[EMAIL PROTECTED]> To: "Sugandha Shah" <[EMAIL PROTECTED]>; "Janning Vygen" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, August 14, 2002 7:04 PM Subject: Re: [SQL] Few Queries On Wednesday 14 Aug 2002 1:29 pm, S

Re: [SQL] Few Queries

2002-08-14 Thread Tom Lane
"Sugandha Shah" <[EMAIL PROTECTED]> writes: > CREATE FUNCTION del_old_history() RETURNS bool AS ' > declare >var_history_age_limit int4; >set_timedatetime; > BEGIN > select into var_history_age_limit history_age_limit from database_info; > IF (var_history_age_limit is not null) THEN

Re: [SQL] Few Queries

2002-08-14 Thread Richard Huxton
On Wednesday 14 Aug 2002 1:29 pm, Sugandha Shah wrote: > Hi , > > No luck . Even with Select Into . Please if any body has faced similar > problem and knows a solution. You don't need select into here - the sample below deletes everything older than one day. You should be able to adapt it to yo

Re: [SQL] Few Queries

2002-08-14 Thread Oliver Elphick
On Wed, 2002-08-14 at 13:29, Sugandha Shah wrote: > Hi , > > No luck . Even with Select Into . Please if any body has faced similar problem and >knows a solution. > > CREATE FUNCTION del_old_history() RETURNS int4 AS ' ^ > declare >var_hist

Re: [SQL] Few Queries

2002-08-14 Thread Sugandha Shah
et_time;END IF;       return true; END;'LANGUAGE 'plpgsql';   Regards, -Sugandha     - Original Message - From: "Janning Vygen" <[EMAIL PROTECTED]> To: "Sugandha Shah" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, Au

Re: [SQL] Few Queries

2002-08-13 Thread Janning Vygen
Am Mittwoch, 14. August 2002 07:05 schrieb Sugandha Shah: > 1. I 'm firing a query and it returns the value in variable which I > need to pass to other query . Is this a right way to pass the > value ? I'm newbie to this Database and hence facing lot of > syntax problems. > > CREATE FUNCTION

[SQL] Few Queries

2002-08-13 Thread Sugandha Shah
  Hi ,     I'm still facing few problems and hence the query . I have searched the archives as well as read the manual.   1. I 'm firing a query and it returns the value in variable which I need to pass to other query .  Is this a right way to pass the value ? I'm newbie to     this Databas