Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP..Update fildes based on info in other fieldes

Status
Not open for further replies.

withoutaclue

Programmer
Aug 28, 2002
31
GB
I am trying to run some queries to assign/update an empty field called “useridTYPE” with some values based on the contents of another field called Userid.

However the Userid fieled consits of a mixture of user information. (inputs from other fields like, forname,surname,initial)

The userid field was not automatically created, it was typed in by the user at the time.
Therefore I need to create a query/or something, that can read the data in the userid field, determine what it is and assign a type value to it in the Usertype filde

Ie
If user id =
Forname.surname = type1
Initalsurname = type 2
Initial_surname = type 3

(I have about 16 types)
can anyone help

how and where is it created?????
 
Hi Without,

This is a major problem where users are given such leeway as to enter data in a continuous string (albeit with delimiters) containing many pieces of information.

To be able to extract the particular info. that you want, you need to find the position of the UserID in all strings entered by all users.

If the user was forced to enter a 'delimter' between each piece of info (e.g. forename,surname,initial,ID) where the comma is the delimter - then you will get most of the data that you want.
Some users however will have neglected to follow the guidelines - and you will get some data in incorrect fields in the table.
Some users won't have an initial for instance, but won't type:

Fred,Bloggs,,ID

they might type:

Fred,Bloggs,ID

which places ID in the 'Initial' place in the string.

If you can zip a small portion of the db and email it, I can give a better answer.

I believe however (from your description) that you will have to re-enter all data into individual fields.

Regards,

Darrylle




"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Hi again,

Sorry,

email: darrylles@yahoo.co.uk

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top