Porting from MSSQL Server

From: "Hans Jorgensen" <jorgensenhans(at)hotmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Porting from MSSQL Server
Date: 2003-08-24 10:13:05
Message-ID: Law9-F48xtznZwx5s0M0000c46c@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I am porting a database from M$SQL Server to PostgreSQL.

I have a problem with a query. On MS SQL Server it looks like this:

DECLARE @handle AS NVARCHAR(40)
EXEC @handle = IPAddressToHandle 'x.x.x.x'
SELECT * FROM tblEmployee WHERE tblEmployee.handle = @handle UNION SELECT
...

I have created the function IPAddressToHandle which works, but how do I
declare the variable handle, execute the function and then the query with
the variable as parameter.

Btw.: I cannot resolve the ip address to the handle with INNER JOINS in the
query since the query is VERY long with many UNION SELECT statements.

/Hans

_________________________________________________________________
F gode tilbud direkte i din mailbox http://jatak.msn.dk

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Guerin 2003-08-24 16:21:54 Cursors
Previous Message Joe Conway 2003-08-23 21:36:09 Re: c-function returns multiple rows