You will need to make a calculated field display a character field. You can refer to this [url="http://mails.datawatch.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=1;t=000361#000005"]thread[/url] on how to pad a number with zeroes.
[size="1"][ May 01, 2006, 05:33 PM: Message edited by: Todd Niemi ][/size]
I tried, quickly, to locate one of those posts, but the search facility didn't seem to help too much.
No worries. What you're after involves creating a Character calculated field to pad a different, usually Numeric, field - say MyVal. It goes something like this:
Right("000000"+Trim(Str(MyVal)),6)[/code]Where the number of 0's displayed is equal to the digit, 6 in this case, which in turn is equal to the total number of characters you want to display, like 000123.
As I recall there is not much you can do directly with a database that supports fields with leading zeros as numerics.
2 ideas come to mind.
Either preprocess the lookup table to a new table or file and include a calcualted field that allows you to make the match and then use the calculated field as the lookup key
Invert the process to that your 'Master' file is the one you really want to lookup from and you 'Look up table' is the data you wanted to lookup for. Do you see what I mean?
You could then filter out any records where the matches are blank and the re-arrange the fields to get the output format you need.
It may sound messy and there might reasons of record volume levels that make it impractical but is does, theoretically, give you back the opportunity to control the field with leading zeros from the database and make a calculated field that is compatible with the field on your other file.
I can expand on the idea but it may be useful to do so with a little more detail on your requirement.
Hope this suggests something to you.
It is a numeric within the database. By changing the field to a character in the extracted data when I go to do an external lookup in the database I do not get a match. /b[/quote]