All Forums UDA
UpaMishra 35 posts Joined 01/08
28 Aug 2009
String manipulation in a MACRO

REPLACE MACRO mydb.emp_mac_test(in_emp_id varchar(300) )AS(sel * from db.emp where emp_id in (: in_emp_id););The requirement is that the macro will be executed as follows:exec mydb.emp_mac_test('A101,A102,A103,A104');How to modify the input string and convert it as 'A101','A102','A103','A104' in the macro.

manjeet 2 posts Joined 06/09
28 Aug 2009

HeyUse index and substring functions to extract the items from string.

You must sign in to leave a comment.