I have join as below. QUERY: select a.country_name, b.state_name, c.city_name, d.product_type, call_func(d.product_id) as product_name from country a,state b,city c,product_info d where a.country_id=b.country_id and b.state_id=c.state_id and c.product_type_id=d.product_type_id; In the above quey tables are taken from different users. FUNCTION: CREATE or REPLACE FUNCTION call_func(product_id IN NUMBER)
RETURN VARCHAR2
IS acc_bal NUMBER(11,2);
BEGIN
SELECT a.product_name as produc_name
INTO product_name
FROM products a,categ b,price c
WHERE a.product_id = product_id and a.categ_id=b.categ_id and b.price_id=c.price_id;
RETURN(product_name);
END; Please ignore in case of any syntax errors but query pupose is same. Please let me know how can I do in SAS. As of now, we copied required database tables in SAS and then doing SAS joins in proc sql. So please suggest me in which ways how can i achieve above one. Thanks In Advance.
... View more