Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with leading 0's

Status
Not open for further replies.

cjany

IS-IT--Management
Nov 3, 2004
72
US
I have a table with an identifier that has leading zeros and another table where the similar identifier does not have leading zeros. I'd like to use this identifier to link the two tables. How can I either add leading 0's or take away the leading zeros to compare the two tables accurately?
 


Hi,

Leading zeros is either a DISPLAY feature for a NUMBER or it is TEXT -- very different.

So which is it?

If it's TEXT, then
[tt]
Format([YourNumberID],"00000000")
[/tt]
for instance, for an 8 character identifier.

Skip,

[glasses] [red]Be Advised![/red] The Vinyards of Texas have produced a wine with diuretic dimishment and urethric relief...
Pinot More![tongue]
 
WHERE Val(Table1.TextField)=Table2.NumericField

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top