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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trimming data and updating table info

Status
Not open for further replies.

balllian

MIS
Jan 26, 2005
150
GB
i Have the following data in my database in which i need to clean which i need to trim to the end of a specific word which in this instance is 'profile'

GBWTB3614H,database=twn_p_wtb?profile=NDpMT05fV1RCMTY3MjEwNTk6TE9OX1dUQjEwOTk2MTc4OkVOR0xJU0g6R0I6MTExMjYxOTAyNToxMTEyNjE5MDY0Ojo6

The line should look like

GBWTB3614H,database=twn_p_wtb?profile

Is there a way of trimming the data so that anything to the right of the word profile is deleted.

I have been doing this using find and replace using profile* with profile but this doesnt seem to work when i have attempted to use an update query. Is there any other way of updating this data.

Thanks in advance


 
UPDATE yourTable SET yourField=Left([yourField],InStr(yourField,'?profile')+7)
WHERE yourField Like '*?profile=*';

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top