View Single Post
Old May 30th, 2006, 4:50 PM   #3
Gumby
Newbie
 
Join Date: Mar 2006
Location: Andover, MA / Rochester, NY / Nanticoke, PA
Posts: 16
Rep Power: 0 Gumby is on a distinguished road
Send a message via AIM to Gumby
Quote:
Originally Posted by Pizentios
Hey,

I would probably see if i could do a SELECT INTO into a var, then return the var (or do what ever you want with the results).

here's a example on SELECT INTO: http://www.postgresql.org/docs/8.1/i...QL-SELECT-INTO
Nope, won't work. If I do:
select '&_CONNECT_IDENTIFIER' into myVar from dual;
Then myVar will just hold the string, '&_CONNECT_IDENTIFIER'. It doesn't replace it with the actual value like it does from the SQLPlus prompt. As far as I can tell, _CONNECT_IDENTIFIER can't be used in a trigger/stored procedure.

On a side note, I can also do this:
fsdevl75@fsdev> select * from PS.PSDBOWNER where ownerid = user;

DBNAME     OWNERID    S
---------- ---------- -
FSDEV      FSDEVL75   U
FSDEVL75   FSDEVL75   U

fsdevl75@fsdev>
But it returns 2 rows in this case, and only one of them is the correct DBName (PS.PSDBOWNER is apparently a PeopleSoft specific table).
Gumby is offline   Reply With Quote