Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> distinct and replace...can anyone help?
Hi,
I have a legacy database to deal with where the company name field is
of the form -
Company Name (Branch Name).
Companies with no branches are in the form - Company Name
I want to select just the company name and i can do this with select replace(name,substr(name,instr(name, ' ('))) from table;
This works fine and gets me a list of company names only.
I need to wrap a distinct round this though and when i do I do get just one version of any of the companies with multiple branches...unfortunately when i use the distinct I don`t get any of the companies with no branches.
Anyone know why this is?
Cheers,
kinch
Received on Thu Sep 13 2001 - 08:42:41 CDT