Quantcast
Channel: Questions in topic: "variables"
Viewing all articles
Browse latest Browse all 49

Dynamic varchar variable

$
0
0
I want to create a dynamic varchar variable like 'B0001'. if the last charcater of the variable exceeds 9 then the variable should look like 'B0010' and if the last character exceeds 99 the variable should look like 'B0100' and so on. Means the length of the variable should be fixed i.e 5 and the last number should be auto incremental like 'B0008','B0009','B0010' ,'B0011' and so on. Also if the last three digits exceeds 99 the variable should look like 'B0099','B0100','B0101' and so on

Viewing all articles
Browse latest Browse all 49

Trending Articles