Porting from MSSQL Server - Mailing list pgsql-novice

From Hans Jorgensen
Subject Porting from MSSQL Server
Date
Msg-id Law9-F48xtznZwx5s0M0000c46c@hotmail.com
Whole thread Raw
Responses Re: Porting from MSSQL Server
List 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


pgsql-novice by date:

Previous
From: Joe Conway
Date:
Subject: Re: c-function returns multiple rows
Next
From: Michael Guerin
Date:
Subject: Cursors