Porting from MSSQL Server

Поиск
Список
Период
Сортировка
От Hans Jorgensen
Тема Porting from MSSQL Server
Дата
Msg-id Law9-F48xtznZwx5s0M0000c46c@hotmail.com
обсуждение исходный текст
Ответы Re: Porting from MSSQL Server  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список 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 по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: c-function returns multiple rows
Следующее
От: Michael Guerin
Дата:
Сообщение: Cursors