MadProfessor
Technical User
Ok first off, sorry if this sounds simple but I am not a SQL genius by any stretch of the imagination.
Here's my problem: I have a SQL database mailing list which all the peoples' full names are in one column. I need to split this into 2 fields: first_name and last_name. I think I need a SQL statement (or perhaps in conjunction with an ASP script or something) that searches from the right of the string until it finds a space, then removes everything to the right of that space, and puts it into the last_name field. I can just then rename the original name field as first_name (I don't care really if there's more than 1 first name in this field).
Can anyone point me in the right direction? Is there a SQL function that will do this? Or does it involve a bit more in depth coding?
Here's my problem: I have a SQL database mailing list which all the peoples' full names are in one column. I need to split this into 2 fields: first_name and last_name. I think I need a SQL statement (or perhaps in conjunction with an ASP script or something) that searches from the right of the string until it finds a space, then removes everything to the right of that space, and puts it into the last_name field. I can just then rename the original name field as first_name (I don't care really if there's more than 1 first name in this field).
Can anyone point me in the right direction? Is there a SQL function that will do this? Or does it involve a bit more in depth coding?