小売および法人の顧客がいるテーブルから選択しています。結果セットで、法人顧客と小売顧客の両方の名前を 1 つの列に返す必要があります。現在、次のように 2 つの異なる列でそれらを返しています。
select e.cust_id, 
       e.cust_location, 
       f.location
       max(case 
             when e.preferredname is not null 
             then e.preferredname 
           end
          )RETAIL_CUST_NAME,
       max(case 
             when e.preferredname is null 
             then e.CORP_NANME 
           end 
          )CORPORATE_CUST_NAME 
  from Mytable e, 
       myothertable f 
 where e.cust-id = f.cust_id
 group by e.cust_id, 
       e.cust_location, 
       f.location, 
       e.preferredname, 
       e.corp_name;
私がやろうとしていることは可能ですか?小売用と法人顧客用に別の列を返さなくても、どうすればこれを達成できますか?