MS-SQL to PostgreSQL

From: "Craig Bryden" <brydencraig(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: MS-SQL to PostgreSQL
Date: 2005-01-07 20:00:47
Message-ID: BAY12-F334DF13317BC1C781212F6B7940@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

Below is a snippet of MS-SQL code. Please can someone translate this to
plpgsql for me.

**************************************************************
DECLARE @MaxVal int, @MinVal int

SELECT @MaxVal = MAX(Value), @MinVal = MIN(Value)
FROM ABC
**************************************************************

The variables would then be used for purther processing.
I know that the variables would be declared like

*******************************************
DECLARE
MaxVal int;
MinVal int;
BEGIN
???
END;
*******************************************

I am not sure of the query part and in particular the assignment of the
values to the variables

Thank you
Craig

_________________________________________________________________
Research SA schools and varsities on MSN Search. http://search.msn.co.za

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-01-07 20:31:07 Re: ERROR: cache lookup failed for type 0
Previous Message Florian G. Pflug 2005-01-07 20:00:12 Problem creating trigger-function with arguments (8.0rc4)