Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL in Pl/SQL

Re: SQL in Pl/SQL

From: Steven Whatley <swhatley_at_blkbox.com>
Date: 4 May 1998 14:27:59 GMT
Message-ID: <6ikj9f$q90$1@news.blkbox.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US