Sunday, March 25, 2012

Cleaning up goldmine Data

Hi,
We are running version 6.5 of Goldmine, which I am migrating to CRM
3.0 - I used access to get the data into SQL, but am now stuck with a
Last Name Column and a Name Column. To get the data into CRM Server
(which the boss is very keen to have done ASAP) I need to have First
Name and Last Name.
Is there an easy (!?) way to get the SQL server to remove the last
name data from name data? For example as it stands at the moment I
would have two cells:
Last Name: Smith
Name: John Smith
What I want to end up with is:
First Name: John
Last Name: Smith
Any suggestions gratefully received!
Many thanks
BlairIf there are only ever two names (one first name followed by one last name,
separated by a space or other distinct charactere) you can simply use
SUBSTRING and CHARINDEX (maybe even PATINDEX). Books Online has several
examples.
ML
Matija Lah, SQL Server MVP
http://milambda.blogspot.com/

No comments:

Post a Comment