Extract part of record using SQL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eagle

    #1

    Extract part of record using SQL

    I have a record with, for instance 000-11-222-33 as text.
    Is there a way to extract just the 222 part? With the sidenote that the 222
    part kan have 3 or 4 characters.
    The 000 and 11 part are always 3 and 2 characters each.

    Thanks!



  • fredg

    #2
    Re: Extract part of record using SQL

    On Thu, 23 Mar 2006 20:49:17 +0100, Eagle wrote:
    [color=blue]
    > I have a record with, for instance 000-11-222-33 as text.
    > Is there a way to extract just the 222 part? With the sidenote that the 222
    > part kan have 3 or 4 characters.
    > The 000 and 11 part are always 3 and 2 characters each.
    >
    > Thanks![/color]

    Val(Mid([FieldName],8))
    --
    Fred
    Please respond only to this newsgroup.
    I do not reply to personal e-mail

    Comment

    • Eagle

      #3
      Re: Extract part of record using SQL


      "fredg" <fgutkind@examp le.invalid> schreef in bericht
      news:1oglcf4z5g dvo$.1du5p0ps8n od9.dlg@40tude. net...[color=blue]
      > On Thu, 23 Mar 2006 20:49:17 +0100, Eagle wrote:
      >[color=green]
      >> I have a record with, for instance 000-11-222-33 as text.
      >> Is there a way to extract just the 222 part? With the sidenote that the
      >> 222
      >> part kan have 3 or 4 characters.
      >> The 000 and 11 part are always 3 and 2 characters each.
      >>
      >> Thanks![/color]
      >
      > Val(Mid([FieldName],8))
      > --
      > Fred[/color]

      Thanks for the quick response Fred.
      Will this give the value from position 8 and up (222-33) or just 222?
      I'll give it a go anyway ;-)


      Comment

      Working...