Re: SQL query question
Posted in 1992
In article <1992Apr14.153529.27934@nas.nasa.gov> jcarter@sun419.nas.nasa.gov (John R. Carter Sr.) writes: >In an article regarding SQL query question Ruchi Patel writes: >> Is there anyway you could update the lower case data into uppercase... >> Is there anyway you could delete a character from the column... > >Although I like the sophisticated method submitted by Paul Roberts, >I prefer to perform an ASCII dump of the offending records and let UNIX do >the conversion, then reload the records. You may find this to be a bit faster >and far less of a problem. UNIX can 'sed', 'tr', 'awk' or even 'perl' >your most gruesome task with ease. It also has the advantage of taking >such mundane tasks out of the database leaving it to do what it does best. >The disadvantage is that you need to lock the tables from updates while >the data is 'outside' being modified, or do this at a time when you know >no one is using the database. If you must have more real time access then >Paul's solution is best. > > Yes, this is probably a much better way to do it. Of course, you have to be careful that you only remove hyphens from the "phone number" field if you do this, and not from the other fields as well. I am not all the fluent at 'sed'/'awk', but I expect you can specify something like this. Paul (Hey, mom, some at NASA said my method was `sophisticated'! :-)