Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need help
"AstroBoy" <jack.tan_at_ihganahotels.com> a écrit dans le message de news: 1165731101.558940.239080_at_l12g2000cwl.googlegroups.com...
| In an Oracle table, the Name column have customers' names contain our
| normal letters A to Z, but also contain characters like &, *, @, etc. I
| need to run a query that would pick out all records with names that
| contain those unwanted characters with the exception of a dash and
| apostrophe, and of course A to Z letters.
|
| example:
|
| Smith
| O'Reily
| Anderson&Smith (should be picked up by the query)
| Mary-Jane
| Takahashi* (should be picked up by the query)
|
| The above may be easy to some of you but for a newbie like me, any
| assistance or pointers is greatly appreciated.
|
| ...Astro
|
select * from mytable
where translate(name,'#<here all allowed characters>','#') is not null
/
Also: select keyword from v$reserved_words where keyword='NAME';
Regards
Michel Cadot
Received on Sun Dec 10 2006 - 01:12:22 CST