siddhs Posted October 22, 2004 Share Posted October 22, 2004 Hi Guys ! Actually I am working on a project wherein I need to identify the identity of an individual on the basis of first 3 digits..... For eg... 001234567 ...here 001 will identify the user as admin ...therefore I need to keep this value in access which by default removes the prefixing zeros :( Any help greatly appreciated.. -Siddhs Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted October 22, 2004 Share Posted October 22, 2004 Hi Guys !? Actually I am working on? a project wherein I need to identify the identity of an individual? on the basis of first 3 digits..... For eg... 001234567 ...here 001 will identify the user as admin ...therefore I need to keep this value in access which by default removes the prefixing zer:( :( Any help greatly appreciated.. -Siddhs 584785099[/snapback] How are you trying to accomplish this currently? Are you using SQL, or is it a VBA app? Actually, I think in either case you could use LEFT(<string>, <number of chars>) to get the first 3. Link to comment Share on other sites More sharing options...
0 siddhs Posted October 23, 2004 Author Share Posted October 23, 2004 How are you trying to accomplish this currently? Are you using SQL, or is it a VBA app? Actually, I think in either case you could use LEFT(<string>, <number of chars>) to get the first 3. 584786073[/snapback] Cheers mate Actually my question is a bit different.... I want to keep the prefixing "zeros" in the numeric format...like say ..i have a number 00123456 but access by default removes the leading zeros there the number is read as 123456...but i want the leading zeros ...it doesnt work :( ...and i want it in long integer data type.... Any help ?? plz -Siddhs Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted October 23, 2004 Share Posted October 23, 2004 Cheers mateActually my question is a bit different.... I want to keep the prefixing "zeros" in the numeric format...like say ..i have a number 00123456 but access by default removes the leading zeros there the number is read as 123456...but i want the leading zeros ...it doesnt work :( ...and i want it in long integer data type.... Any help ?? plz -Siddhs 584788795[/snapback] You want the moon with that, too? ;) Not possible if you're storing it as a bigint. Leading zeroes will always be trimmed. You would need to store it as a varchar. Is there any particular reason to storing it as a bigint? Link to comment Share on other sites More sharing options...
0 idbuythatforadollar Posted October 23, 2004 Share Posted October 23, 2004 Use a string rather than integer, and it won't remove 000s from the start Link to comment Share on other sites More sharing options...
Question
siddhs
Hi Guys !
Actually I am working on a project wherein I need to identify the identity of an individual on the basis of first 3 digits.....
For eg...
001234567 ...here 001 will identify the user as admin ...therefore I need to keep this value in access which by default removes the prefixing zeros :(
Any help greatly appreciated..
-Siddhs
Link to comment
Share on other sites
4 answers to this question
Recommended Posts