Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Data & Imports Forums - SalesLogix Imports
Forum to discuss general SalesLogix import and data migration topics. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Imports | New ThreadView:  Search:  
 Author  Thread: Splitting a contact name
SLX_Novice
Posts: 246
 
Splitting a contact nameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Apr 06 7:50 AM
fiogf49gjkf0d
Hi all.

I am new to SalesLogix 6.2.1 so please bare with me. I am trying to import some new accounts and contacts via a CSV file. All of the fields import correctly, but I am having trouble with the contact name, the CSV does not split it into: LastName and FirstName but rather puts both into one field: FirstName LastName (John Doe). I am using the Import Wizard for this, I was able to concatenate the phone number and area code, but I do not know how to split, so that it goes into the proper fields in the Contact Table. Any ideas?
[Reply][Quote]
Eric Hobbs
Posts: 28
 
Re: Splitting a contact nameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 06 1:57 AM

zofran

zofran
fiogf49gjkf0d
Hi Fabian. I have had to do this before. One method I use is to import the column that needs to be split into a temporary column. You need to use the charindex and substring T-SQL functions to split the string.

In this example all the contact names have been imported into a column in the contact table named "tempconname".

To get the firstname you would run something like this

UPDATE CONTACT
SET CONTACT.FIRSTNAME = LEFT(TEMPCONNAME, CHARINDEX(' ', TEMPCONNAME))

This sets the contact.firstname field to the first string of characters in the column before a space is encountered. This assumes that your contact name is in the format firstname(space)lastname. If you have titles (e.g. Mr. Mrs. etc..) you will need to modify the statement.

To get the lastname

UPDATE CONTACT
SET CONTACT.LASTNAME = SUBSTRING(TEMPCONNAME, CHARINDEX(' ', TEMPCONNAME)+1, LEN(TEMPCONNAME))

The substring function required three arguments (expression, start, length) in this case our expression is the column tempconname. The start point is the index position of the first space + 1. (This saves running a further ltrim update later to remove extraneous spaces). The length of the substring is just the length of the entire column. This will insert some spaces in the lastname column, so you may also need to run:

UPDATE CONTACT
SET CONTACT.LASTNAME = RTRIM(CONTACT.LASTNAME)

or just play around with the sting functions until you find a way that works.

You can test and experiment with the results by replacing the UPDATE statements with SELECT statements. Also the BooksOnline T-SQL help function in the SQL Query Analyser tool contains more in depth details about the various SQL string functions.

Good Luck

[Reply][Quote]
Jay Welther
Posts: 28
 
Re: Splitting a contact nameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 06 9:09 AM

viagra cena

viagra cena blog.bjorback.com
fiogf49gjkf0d
Quote:
Originally posted by Fabian Garcia

Hi all.
... FirstName LastName (John Doe). I am using the Import Wizard for this


The Import Wizard has functions to split a combined name field into first, last, middle, as well as prefix and suffix. Is this not working for you?
[Reply][Quote]
SLX_Novice
Posts: 246
 
Re: Splitting a contact nameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 06 9:18 AM
fiogf49gjkf0d
I was not aware those functions existed, when I called SalesLogix Technical Support they were not able to help me either. Where could I find those functions to split?
[Reply][Quote]
Jay Welther
Posts: 28
 
Re: Splitting a contact nameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 06 9:37 AM
fiogf49gjkf0d
Go through Import Wizard openning screens until you get to the screen for Field Mapping into the Contact table. Drag your combined Name field on the left onto the LastName field on the right. Drag it again onto the FirstName field. If your combined name might contain a middle name or prefix (Dr., Mr., etc.) or suffix (Jr., Esq., etc.) then drag the combined name field onto those fields as well.

Hightlight the new entry that is now indented under the LastName field. Double click it or click the View/Modify button (red cross in circle). In the middle Value area click the Edit button. The top Field Value section should be selected. If not, select it. Your combined name field name will be in the Field field (is that clear? ). Click the down arrow on the right side of the Function field and select LastName function. Click OK a couple of time and repeat for FirstName and the other name parts.
[Reply][Quote]
SLX_Novice
Posts: 246
 
Re: Splitting a contact nameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 06 10:32 AM

buy abortion pill kit online cheap

buy the abortion pill ru486 online click
fiogf49gjkf0d
It worked! Thank you very much!
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 10:18:49 AM