Results 1 to 7 of 7

Thread: Query

  1. #1
    Join Date
    May 2002
    Posts
    73

    Unanswered: Query

    Guys:

    I run a query and get a field with 13 characters lenght. Is there any way to get or truncate the lenght of the field in the same scripts??. I need just 10 characters starting from the third one.

    Thanks

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Use the right string function.

  3. #3
    Join Date
    May 2002
    Posts
    73

    right string

    How I can use the right string function??

    How I can indicate the lenght and from what position to truncate??

    Regards

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    Do all the fields have a length of 13 ? Do you always want the 10 characters, starting with the 3rd character - no matter what the length is ?

  5. #5
    Join Date
    May 2002
    Posts
    73

    right string

    Yes, always 13 positions and always I will need 10 positions after third.

    Regards,

  6. #6
    Join Date
    Feb 2002
    Posts
    2,232
    select right(fieldname, 10) from ...

    Since you know the field is always 13 characters grabbing 10 characters will always start from the 3rd position:

    e.g. fieldname = 'abcdefghijklm'
    right(fieldname,10) = 'defghijklm'

  7. #7
    Join Date
    May 2002
    Posts
    73

    Thanks

    I will try it.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •