Hi Jari, > >have not figured out if one can do character changes with mysql, any one > >know how to do the following for fields in a table > > > >Altering all the x-characters to character y ? > > > > > >=You sure can. Manual reference: 6.3.2 String Functions > >REPLACE() will find the x-characters and replace them all with character > >y. > > > >=Regards, > >=dn > Thanks, > > I got the same reply moment ago :) somehow had the impression I cannot use > fields in the replace but just strings
That reply has not yet shown up on the list (yet) - perhaps the person does not realise that by doing list members the 'favor' of not adding to list volumes, it also does a disservice because others cannot see that you have received a response and so waste their time and effort trying to help you out. (choice: more msgs to DELete, or wasting my time composing an answer to a solved problem? - I know which I prefer!) I'm not sure if I understand what you're saying here... The manual gives a single example: select REPLACE('www.mysql.com', 'w', 'Ww'); which certainly does only use string-constant values. However the template says "str", ie string expression (anything as long as it evaluates to a string); so you can code: select REPLACE( colNm, 'w', 'Ww'); and that will work. However, if you want to try: select REPLACE( colNm1, colNm2, colNm3 ); then I wouldn't like to say/haven't tried it - but have my doubts! If that's your plan, then please try it, and I'll be interested to hear how you get on... In case you are a newbie: may I suggest that you add a new column to the table (ALTER TABLE) and either copy the column that you are going to string-edit (as a 'backup' that you could subsequently, quickly 'restore') or code the UPDATE to amend/insert at the new column instead of overwriting the existing column - thus you can easily see 'before' and 'after' values/debug! Of course, before you debug any UPDATE/DELETE etc code, you backup the entire (valuable) table - right!? Regards, =dn --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php