2009 Oct 13 7:41 AM
Q]] typically to store zip codes, account numbers...etc we use type N. Why do we not use type I ---any specific reason?
2009 Oct 13 7:46 AM
Hi,
Normally for Zip codes and account numbers we use type 'N'.
for example if we have a variable with 20 characters for a account number and actual number is 12 characters only then if we use this variable as type 'N' all remaining 8 characters will be '0' are added first and 12 character number will followed by 8 zeros, but if we use as type 'I' it will store those 12 characters only.
Thanks & Regards,
Rajni MV.
2009 Oct 13 7:46 AM
Histrorical reasons, N is used mostly for numbers where no callcualtion takes place. Its just a character field conatining only numbers. Cause of the lack of calculation no conversion into int, float or packed is needed.
2009 Oct 13 7:46 AM
Hi,
Normally for Zip codes and account numbers we use type 'N'.
for example if we have a variable with 20 characters for a account number and actual number is 12 characters only then if we use this variable as type 'N' all remaining 8 characters will be '0' are added first and 12 character number will followed by 8 zeros, but if we use as type 'I' it will store those 12 characters only.
Thanks & Regards,
Rajni MV.
2009 Oct 13 7:48 AM
Hi,
Type N is a character type which is specifically used to hold Numbers and are not calculation oriented in general. Thats why zip codes, account numbers are stored as type N on which calculations wont be done in general. Where as those defined as Type I is a numeric type and is used for calculations
Vikranth
2009 Oct 13 7:49 AM
2009 Oct 13 7:52 AM
2009 Oct 13 8:12 AM
Hi,
To store the zip codes / account numbers say one of the value is '001011'
if the variable of type i is used it simply ignores the leading zeroes & takes the value as '1011'
hence u can use the variable of type N where calculations need not be performed.
Regards,
Deeba.
2009 Oct 30 6:16 AM
thank you -
even if I am late pls , do not worry , I will definitely respond
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |