MS Access question

AsSiMiLaTeD
AsSiMiLaTeD Posts: 11,725
edited August 2007 in The Clubhouse
I'm pulling a field into a query and need to ignore the first 5 characters of the field. The field may be different lengths, but it's always going to be more than 5 characters and I always need to ignore the first 5.

Is there a trim function that I can use? I'm familiar with TRIM() but I think that only works for leading spaces or zeroes, not what I need.

I know we've got some programmers in here, thought I'd see if anyone can help.
Post edited by AsSiMiLaTeD on

Comments

  • cnjvh
    cnjvh Posts: 253
    edited August 2007
    Try:

    Like "*querytext"

    where querytext is whatever your actually searching for
    No earth robot is going to tell ME which button to press!!

    --Stuff--
    Front: Polk Audio RTi12
    Center: Polk Audio CSi5
    Surrounds: Polk Audio RTi8 (x4)
    Sub: SVS PB10-ISD (Dual)
    AVR: Denon AVR-3805
    Blu-Ray: Panasonic BD30
    Display: Sony KDL-55NX720B
    STB: Xfinity X1DVR
  • bradm6406
    bradm6406 Posts: 39
    edited August 2007
    Try this....

    SELECT MID(my_column, 6)
    FROM my_table

    or if you want the spaces gone too...

    SELECT MID(TRIM(my_column), 6)
    FROM my_table



    Brad
  • AsSiMiLaTeD
    AsSiMiLaTeD Posts: 11,725
    edited August 2007
    Thanks Brad, exactly what I was looking for...I knew there had to be some syntax for it...