Case Statement
From: ExecMan <artmerar_at_yahoo.com>
Date: Thu, 29 Sep 2011 10:56:22 -0700 (PDT)
Message-ID: <8ff715bb-411a-4acd-935f-9cd1cc150bfd_at_j20g2000vby.googlegroups.com>
[Quoted] [Quoted] This is interesting, anyone ever get this?
Date: Thu, 29 Sep 2011 10:56:22 -0700 (PDT)
Message-ID: <8ff715bb-411a-4acd-935f-9cd1cc150bfd_at_j20g2000vby.googlegroups.com>
[Quoted] [Quoted] This is interesting, anyone ever get this?
[Quoted] [Quoted] Here is my calling line: exec customer_report(12345, '', 12345)
PROCEDURE customer_report (p_customer_id NUMBER, p_adid VARCHAR2, p_product_id NUMBER) IS
This fails the WHEN and executes the ELSE v_adid := CASE p_adid
WHEN NULL THEN ' '
ELSE ' AND UPPER(ss.adid) = UPPER(''' || p_adid ||
''')'
END;
This works fine and executes the proper IF side.
IF p_adid IS NULL THEN
v_adid := ' ';
ELSE
v_adid := ' AND UPPER(ss.adid) = UPPER(''' || p_adid || ''')';
END IF;
What is the difference?
Received on Thu Sep 29 2011 - 19:56:22 CEST
