Removing partial data from a Field

  ihbuk1 14:25 24 Jan 2003

I have information on a database that has some surnames with "(z)" before their surnam and others without that. I want to remove those incidences of "(z)" so that just the surname is left.

Can anyone help me, please?

  cherria 14:32 24 Jan 2003

What sort of database?

  ihbuk1 14:38 24 Jan 2003

Oops sorry it is in Access 2000.

  recap 15:13 24 Jan 2003

Sort the table in ascending order then all the "z" will or should be at the bottom, then you should be able to delete the "z".


run a query to find the data with "z" before it and delete it from there.

  cherria 15:20 24 Jan 2003

Backup your database first so you can't accuse me of wrecking it....

If your table is called tab1 and the field is called surname then create a query, go into the SQL editor and type:

update tab1 set surname=right(surname,len(surname)-3) where left(surname,3)="(z)"

hit the ! button to run the query and hey presto!

remember backup first!!!

  ihbuk1 15:35 24 Jan 2003

Can I thank you all for those who have responded to this quiry. I have resolved the problem. Your help is much appreciated.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

WPA2 hack: How secure is your Wi-Fi?

HP’s new Surface Pro rival is designed specifically for Adobe-using designers and artists

Best kids apps for iPhone & iPad

Que faire si son iPhone ou iPad est tombé dans de l'eau ?