I came up with this SQL based on what I understood. I created two more numeric
fields called County and Location in MyTable where CS exist.
UPDATE MyTable SET MyTable.County = IIf([CS]<1000,Left([CS],1),Left([CS],2)),
MyTable.Location = Right([CS],2);
Hope that answers you question.
takeadoe <[EMAIL PROTECTED]> wrote:
I've got a favor to ask -
Consider the following numeric field:
511
6805
3205
403
I need to make 2 new numeric fields from this variable, call it CS
(short for Check Station)
The first 2 numbers (even when there are only 3 digits - zeros are
missing) represent the County and the last 2 the location within the
county. County ranges from 1-88, location from say 1 to 20.
How would I create 2 new numeric fields with the following conditions:
if CS < 1000 then county=the first digit and location=the next 2
else
county=first 2 and location = next 2
Any help on this would really be appreciated.
Mike
May God bless you beyond your imagination!
Lonnie Johnson
ProDev, Professional Development of MS Access Databases
Visit me at ==> http://www.prodev.us
---------------------------------
Groups are talking. We´re listening. Check out the handy changes to
Yahoo! Groups.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ms_access/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/