Use the Left() and Right() functions.
Left ("DOC51110",3) --> "DOC"
Right("DOC51110",4) --> "1110"
You could use these in a query too.
(example)
Select Left(ItemField,3) as [Log Cod], Right(ItemField,4) as [Product Code]
From Table1
HTH
Rob Mastrostefano

Signature
FMS Professional Solutions Group
http://www.fmsinc.com/consulting
Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com
FMS Advanced Systems Group
http://www.fmsasg.com/
>I have an Itemfield in my Itemtable, what I would like to do is extract
>some
[quoted text clipped - 14 lines]
> FSP 1110
> FSS 1111
JOM - 15 Nov 2005 23:19 GMT
Thanks, but how am I going to put that informaion into a different table? and
what if for example I have the first 3 as DOC123 how will this be taken care
of?
> Use the Left() and Right() functions.
>
[quoted text clipped - 30 lines]
> > FSP 1110
> > FSS 1111
RobFMS - 15 Nov 2005 23:37 GMT
Well, I am assuming you have a table that has the same field names/sizes so
you can create a query.
Insert Into Table2 (ItemField)
Select Distinct Left(ItemField,3) as [Log Cod], Right(ItemField,4) as
[Product Code]
From Table1
This will take the data from Table1 and put it into Table2
I believe the "Distinct" keyword in the query will help elimate the
duplicates, which is what I believe the other part of your question was
about.
Give that a try and let me know how it works out for you.
Rob Mastrostefano

Signature
FMS Professional Solutions Group
http://www.fmsinc.com/consulting
Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com
FMS Advanced Systems Group
http://www.fmsasg.com/
> Thanks, but how am I going to put that informaion into a different table?
> and
[quoted text clipped - 39 lines]
>> > FSP 1110
>> > FSS 1111
Ofer - 15 Nov 2005 23:55 GMT
Instead of the right(FieldName,3) I would use Mid(FieldName,4) that way it
will take how many digits there are after the three text chr.

Signature
I hope that helped
Good Luck
> Thanks, but how am I going to put that informaion into a different table? and
> what if for example I have the first 3 as DOC123 how will this be taken care
[quoted text clipped - 34 lines]
> > > FSP 1110
> > > FSS 1111
Ofer - 16 Nov 2005 00:01 GMT
Ignore my post for now
You asked what will happen if you have DOC123, what do you want to happen
with this?
DOC and 123
or
DOC and 23 ignore the 1 like you ignore the 5 in your example
> Instead of the right(FieldName,3) I would use Mid(FieldName,4) that way it
> will take how many digits there are after the three text chr.
[quoted text clipped - 37 lines]
> > > > FSP 1110
> > > > FSS 1111