If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"replace" function in SQL
Good mornig / evening everybody!
I've got a question. Is there any way to modify a record within MS Access 2K database using SQL? Let's say that there is a field with such values (text): wer234/4gd 2jklrumuu/ewq3 reew/kk62 344bn/ppppppppp etc... These values do not have same amount of characters.. What I want to do is to remove "/" (slashes) from these values. How can I do it using SQL, or, if there is not such function in SQl, maybe it's possible using VBA6? Thank you 4 your help |
#2
|
|||
|
|||
"replace" function in SQL
Jason,
The following query will replace all occurrences of slashes ( / ) in every record in the table, with nothing: UPDATE tblMyTable SET myField = Replace(myField, "/", "") Rename all the objects to reflect the names you have given them, then run the query. The following query will replace all occurrences of slashes ( / ) in a specific record, with nothing: UPDATE tblMyTable SET myField = Replace(myField, "/", "") WHERE someField = 123 Again, rename all the objects to reflect the names you have given them, and change 123 to some meaningful value. Then run the query. Regards, Graham R Seach Microsoft Access MVP Sydney, Australia Microsoft Access 2003 VBA Programmer's Reference http://www.wiley.com/WileyCDA/WileyT...764559036.html "JasonS" wrote in message ... Good mornig / evening everybody! I've got a question. Is there any way to modify a record within MS Access 2K database using SQL? Let's say that there is a field with such values (text): wer234/4gd 2jklrumuu/ewq3 reew/kk62 344bn/ppppppppp etc... These values do not have same amount of characters.. What I want to do is to remove "/" (slashes) from these values. How can I do it using SQL, or, if there is not such function in SQl, maybe it's possible using VBA6? Thank you 4 your help |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Function for % gain? | Norman Harker | Worksheet Functions | 4 | April 1st, 2004 11:54 AM |
Dedupe Function works/works not | Tom Bock | Worksheet Functions | 5 | March 17th, 2004 08:41 PM |
Modify "Remove Dots" function | Tom Bock | Worksheet Functions | 3 | March 15th, 2004 09:28 PM |
WEEKNUM function | david p | Worksheet Functions | 8 | March 13th, 2004 03:24 PM |
VBA user-defined worksheet function | Val | Worksheet Functions | 2 | December 8th, 2003 07:53 AM |