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