Hey everyone,
Need a little help with creating a query to split some data. If there was a common character associated with this field then using the substring and trim functions would probably allow me to do this, however my sql is a little rusty when it comes to this nature of things.
I've basically got a single field that contains a list of names, the data should really be split into two separate fields called FirstName and LastName. At the moment, the data is at least consistent in the overall scheme that the FirstName and LastName start with capitals.
Example:
JohnDoe
JaneDoe
RayWoodie
ToddEmrich
etc....
As you can see the consistency is there that I believe I should be able to just construct a query using some type of functions to just set the first upper letter then the lower string immediately following until another upper is hit. As far as actually constructing this query is where I get lost as I'm not familiar with the functions that I would need to use to grab just that segment of data.
Can anyone offer some advice of which functions and/or possibly throw a quick query together to split the data for me?
Btw, the database that i'm working with is a borland (paradox) type so some of the more common t-sql functions may not be supported.
Thanks,
Nem
Need a little help with creating a query to split some data. If there was a common character associated with this field then using the substring and trim functions would probably allow me to do this, however my sql is a little rusty when it comes to this nature of things.
I've basically got a single field that contains a list of names, the data should really be split into two separate fields called FirstName and LastName. At the moment, the data is at least consistent in the overall scheme that the FirstName and LastName start with capitals.
Example:
JohnDoe
JaneDoe
RayWoodie
ToddEmrich
etc....
As you can see the consistency is there that I believe I should be able to just construct a query using some type of functions to just set the first upper letter then the lower string immediately following until another upper is hit. As far as actually constructing this query is where I get lost as I'm not familiar with the functions that I would need to use to grab just that segment of data.
Can anyone offer some advice of which functions and/or possibly throw a quick query together to split the data for me?
Btw, the database that i'm working with is a borland (paradox) type so some of the more common t-sql functions may not be supported.
Thanks,
Nem