Hi all
My function return the a customer address. Some customers has got 2 then it doesn't return any values. The cust with one value does return the correct value. How can I fix this. Here is my Script
Function
Execute with this.
My function return the a customer address. Some customers has got 2 then it doesn't return any values. The cust with one value does return the correct value. How can I fix this. Here is my Script
Function
Code:
CREATE or replace FUNCTION get_add(acc_no IN varchar)
RETURN varchar
IS
C_CONTACT1_NEW VARCHAR(50);
BEGIN
SELECT C_CONTACT1
into
C_CONTACT1_NEW
FROM orders A
where a.consigneekey = acc_no
group by C_CONTACT1
;
RETURN(C_CONTACT1_NEW);
END;
Code:
SELECT get_add('002358-C') FROM DUAL;
Comment