MS-SQL to PostgreSQL - Mailing list pgsql-general

From Craig Bryden
Subject MS-SQL to PostgreSQL
Date
Msg-id BAY12-F334DF13317BC1C781212F6B7940@phx.gbl
Whole thread Raw
Responses Re: MS-SQL to PostgreSQL
List 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


pgsql-general by date:

Previous
From: "Florian G. Pflug"
Date:
Subject: Problem creating trigger-function with arguments (8.0rc4)
Next
From: Tom Lane
Date:
Subject: Re: ERROR: cache lookup failed for type 0