Alpha Video Training
Results 1 to 2 of 2

Thread: Truncate beginning characters

  1. #1
    Member
    Real Name
    John Cunradi
    Join Date
    Aug 2000
    Posts
    464

    Default Truncate beginning characters

    I'm trying to get an update to work.

    My goal is to take a character field and remove the beginning characters to reduce it down to a specific length, in my case 10 characters long..

    For example.
    123456789012 becomes 3456789012
    12345678901 becomes 2345678901

    The filed length can vary from record to record and that's the difficulty.

    The attached screen shot give you an idea of code that is mostly working but not quite. It seems to work fine for the first record but not subsequent records.

    How can I get this to work on any length field and not just a specific length field ?

  2. #2
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,212

    Default Re: Truncate beginning characters

    John,
    It seems to me if you want the last 10 characters, you would use right(alltrim(data_sku),10). Is there a reason that does not work?
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

Similar Threads

  1. truncate text on label
    By Fred Sides in forum Alpha Five Version 5
    Replies: 3
    Last Post: 12-06-2004, 01:38 PM
  2. Building Indexes - how to truncate field?
    By Dave Wilson in forum Alpha Five Version 6
    Replies: 3
    Last Post: 09-08-2004, 09:16 PM
  3. Beginning a relational database
    By lbrady in forum Alpha Five Version 5
    Replies: 1
    Last Post: 04-04-2003, 04:49 PM
  4. Files beginning with $
    By Gil Smith in forum Alpha Five Version 4
    Replies: 7
    Last Post: 08-22-2001, 06:53 AM
  5. Beginning Database
    By Chris Stevenson in forum Alpha Five Versions 2 and 3
    Replies: 1
    Last Post: 09-20-2000, 01:15 PM

Bookmarks

Posting Permissions

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