Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Splitting field into:

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-27 : 23:56:26
Mads writes "Hi!

I have a database with a table containing names. The names are stored in one single field like this:
"John Doe"

I'd like to construct a query that splits the name into two new fields, like this:
"John" "Doe"

Also (important) there are people with middlenames or initials:
"Samuel L. Jackson" -> "Samuel L." "Jackson"

Also single names occur. I'd like those presented in the field for the last name:
"" "Peterson"

All this, I'd like to have done without the use of coding like VBScript. It should be so, that I can enter it directly into the SQL view of a query in a MS Access97 database.

I desperately hope that you are able to help me, as I need to have it working by december 1st :)

Any help/pointers are greatly appreciated.

Thank you.

Yours truly,

Mads, Denmark"
   

- Advertisement -