Date: Jan 16, 2013 5:33 PM
Subject: Re: Help using textscan or sscanf
On 1/16/2013 4:11 PM, Kevin Ellis wrote:
> dpb <email@example.com> wrote in message <firstname.lastname@example.org>...
>> On 1/16/2013 3:21 PM, Kevin Ellis wrote:
>> > Thanks for attempting the solution....
>> What was wrong with it, specifically?
> Adding zeros to the shorter account numbers is easy to do, but I didn't
> understand how the zeros would "be sorted out" and what specific
> function would do that (sscanf?,textscan?).
You wouldn't have to, that was just an optional suggestion.
Whether it is a good idea or not is dependent on what you do w/ the
account numbers later on--if they're just arbitrary numbers and nothing
is done with them in database searches or somesuch then it may make no
difference--often, however, folks do things like sort if there is some
sort of a key that caused a given number to be generated or the like.
It would be entirely dependent upon the application. There's some
symmetry in having a consistent length--again whether it's of any value
for reports, etc., is application-dependent.
The solution I gave reproduced your values for your sample set afaik. I
was wondering what was wrong with it that you weren't apparently
satisfied and went to something else you said you didn't like.