Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Unanswered: re-arrange name data

    i'm attempting to make a DTS package that will export to a csv each day. my problem is figuring out how to change a name field that stores the data as the following format:

    First Middle Last

    into

    Last, First Middle in the outputted .csv file

    thanks in advance.

    -c

  2. #2
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    substring(fld,len(fld) - charindex(' ',reverse(fld)),len(fld))
    + ', ' + left(fld,len(fld)-charindex(' ',reverse(fld)))

    The numbers will be a bit wrong but you can fix that.

Posting Permissions

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