• 0

prefixing in access


Question

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

  • 0
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

  • 0
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

  • 0
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

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

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.