Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
I have a variable like this:
SET v_Identifier = 'audit_id','audit_type','audit_date';
Currently there is a 3 itemes. But this amount could be changed. So I need dynamicly count amount of items in this variable.
Could you plese give a hint how to do this?
Accoding the your needs, different solutions can be applyed, one can be:
SubStringCount(v_Identifier,',')+1
Accoding the your needs, different solutions can be applyed, one can be:
SubStringCount(v_Identifier,',')+1
@Peonynjmcdirect wrote:
Hi all.
I have a variable like this:
SET v_Identifier = 'audit_id','audit_type','audit_date';
Currently there is a 3 itemes. But this amount could be changed. So I need dynamicly count amount of items in this variable.
Could you plese give a hint how to do this?
To dynamically count the number of items in your variable v_Identifier
, you can use a combination of string functions. Since you're using a string that contains items separated by commas, you can split the string and count the resulting parts.
@micheledenardi thank you! this is what I need.