Take second word (1 Viewer)

adi32

Registered User.
Local time
Today, 19:58
Joined
Dec 6, 2000
Messages
82
I have a table with Surname-Names in one field
Is it possible to have only the name as result ??

i want to sort the persons by their names (the second word)
 

Rabbie

Super Moderator
Local time
Today, 19:58
Joined
Jul 10, 2007
Messages
5,906
In that case you will need to split your data into two fields - one for the surname and one for their first name. Remember not to use Name as a field name as it is a reserved word. You should be able to write an update query to split the field pretty easily.
 

adi32

Registered User.
Local time
Today, 19:58
Joined
Dec 6, 2000
Messages
82
thank you

Is it possible to use a function to find the gap between thw 2 words and with the function MID to take the second ?
 

Rabbie

Super Moderator
Local time
Today, 19:58
Joined
Jul 10, 2007
Messages
5,906
If I was doing this I would use the INSTR function to find the "-"which you seem to be using as a separator and combine this with a RIGHT function to pick up the firstname

It would be something like this

Namefield = Right(Instr(1,Fullnamefield,"-"))
 

adi32

Registered User.
Local time
Today, 19:58
Joined
Dec 6, 2000
Messages
82
thank you
it works with this
Mid([name];InStr(1;[name];" ")+1)
 

Users who are viewing this thread

Top Bottom