Archives of the TeradataForum
Message Posted: Thu, 31 Aug 2000 @ 09:47:24 GMT
I don't know whether you've managed to suss this, but I've tried the following on some simple test data and I think it does what you want.
replace macro m1 (invar varchar(255)) as (select * from t1 where index(:invar||' ', trim( leading from (c1 (format 'zzzzzzzzz9'))||' ' ) ) >0;);
Make sure you get the spaces concatenated correctly in the "WHERE INDEX.." clause.
To use this, the user needs to supply the parameter value with spaces between each value, such as "exec m1 ('1 23 356')"
Give it a go and see how you get on.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|