Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

How do I pull the first 3 characters of a field

Discussion in 'Information Technology' started by Crystal, Nov 1, 2005.

  1. Crystal

    Crystal
    Expand Collapse
    Guest

    I have an item number example: TIMTIMUS63042RSC3
    I need to pull the first three characters example: TIM
    and make it my StkSec column. And the next 3 characters example: TIM
    and make it my Brand column. And the next 2 characters example: US
    and make it my CtryCd column.
    Could someone assist me?

    Thanks
     
  2. Loading...

    Similar Threads Forum Date
    oh well, may as well pull an all nighter Blogs Oct 16, 2015
    Controversial British people pull some extreme disrespect and Beadbi near Southall Gurdwara Hard Talk May 9, 2012
    Inspirational Bystanders Pull Utah Man Out from Under His Burning Motorcycle Videos Sep 15, 2011
    SRCC SIFE Students Lift Rickshaw Pullers from Abyss Inspirational Stories Jun 25, 2011
    India Bill & Melinda Gates Foundation to pulls out of India Breaking News Aug 2, 2009

  3. Ofer

    Ofer
    Expand Collapse
    Guest

    Try this

    Select Left(FieldName,3) as StkSec ,Mid(fieldName,4,3) As Brand ,
    Mid(FieldName,7,2) As CtryCd From TableName
    --
    If I answered your question, please mark it as an answer. That way, it will
    stay saved for a longer time, so other can benifit from it.

    Good luck



    "Crystal" wrote:

    > I have an item number example: TIMTIMUS63042RSC3
    > I need to pull the first three characters example: TIM
    > and make it my StkSec column. And the next 3 characters example: TIM
    > and make it my Brand column. And the next 2 characters example: US
    > and make it my CtryCd column.
    > Could someone assist me?
    >
    > Thanks
     
  4. Crystal

    Crystal
    Expand Collapse
    Guest

    THANK YOU SO MUCH!!!!! You got it right on the money. : ) : )

    "Ofer" wrote:

    > Try this
    >
    > Select Left(FieldName,3) as StkSec ,Mid(fieldName,4,3) As Brand ,
    > Mid(FieldName,7,2) As CtryCd From TableName
    > --
    > If I answered your question, please mark it as an answer. That way, it will
    > stay saved for a longer time, so other can benifit from it.
    >
    > Good luck
    >
    >
    >
    > "Crystal" wrote:
    >
    > > I have an item number example: TIMTIMUS63042RSC3
    > > I need to pull the first three characters example: TIM
    > > and make it my StkSec column. And the next 3 characters example: TIM
    > > and make it my Brand column. And the next 2 characters example: US
    > > and make it my CtryCd column.
    > > Could someone assist me?
    > >
    > > Thanks
     

Share This Page