Page 1 of 1

Migration from Oracle to PG

Posted: Mon 16 Aug 2021 13:00
by OdacPgdac
odac
component TOraSQL

Code: Select all

begin
  :param1 := 5;
end;
after execution i can get result of out parameter

Code: Select all

OraSQL->ParamByName("param1")->AsInteger;
pgdac
component TPgSQL

Code: Select all

DO $$
BEGIN
  :param1 := 5;
END $$;
after execution i get error "syntax error at or near ":""
how to use out parameter in pg?

Re: Migration from Oracle to PG

Posted: Wed 18 Aug 2021 04:34
by evgeniym
Hi there!
Thanks for your question!
DO - execute an anonymous code block, it returns no results.
For more details, please see this documentation:
https://www.postgresql.org/docs/13/sql-do.html

Let us know if you have any questions!