on 06-18-2016 9:37 AM
Hi All,
I have created 2 variables
1. Test varchar(10);
2. File_change(100);
In script I have done like this
$Test = '00000049';
print( $Test );
print values is: 00000049, After I want to add 1 to this value, for that i have created script like below
$File_Change = $Test + 1;
print( $File_Change );
but i am getting print value: 50
even i tried with Concationation(||) operator
$ $File_Change = $Test || '+ ' ||1;
This time I am getting print value 00000049+1
But I want to get "00000050" Can anyone please guide me how to do this.
Thanks
Murali
1. $Test int;
2. $File_Change varchar(100);
$Test = 49;
print( $Test );
$File_Change = to_char($Test + 1,'09999999');
print( $File_Change );
This will also give correct results when $Test >= 99.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murali,
Try this
$File_Change = '000000' ||$Test+1;
print($File_Change );
Thanks,
Ravi kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.