Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL in Pl/SQL
Mark Aengenheyster <"'no spam loser' aengenhm"@rspa.dot.gov> wrote:
: I am having a serious lapse of intelligence here.
: here is my SQL which is inside my PL/SQL function:
: SELECT ADID INTO V_ADID FROM OP_ADDRESS
: WHERE CITY = V_CITY
: AND STATE = V_STATE;
I'd use:
SELECT ADID INTO V_ADID FROM IP_ADDRESS
WHERE (CITY = V_CITY
OR (V_CITY IS NULL AND CITY IS NULL))
AND (STATE = V_STATE
OR (V_STATE IS NULL AND STATE IS NULL));
Later,
Steven
_|_ | _|_ "I am the way and the truth and the life. | --|-- | No one comes to the Father except through Steven Whatley | | | me. If you really knew me, you would Houston, Texas | know my Father as well. From now on, swhatley_at_blkbox.com | you do know him and have seen him." http://www.blkbox.com/~swhatley/ -- Jesus Christ (John 14:6-7 NIV)Received on Mon May 04 1998 - 09:27:59 CDT
![]() |
![]() |