i have 2 databases i select some filds from 1 and join with other field in the second
i need the value selected from table 1 to be displayed in a way
that instead of value = 1 it display "gen clnc"
the code is
select distinct a.ENBR , a.ENAM AS,SUBSTR(b.VSTDTE,1,9), CLINTYP is( SELECT CASE when CLINTYP = '1' then 'Gen. Clinic' when CLINTYP = '3' then 'both Clinic'else 'Dent. Clinic' end FROM CLNCVST where VSTDTE='15-May-13' )from MAINFRAME.EMPBAS a inner join CLINIC.CLNCVST b ON a.EMPNBR=b.EMPNBR where b.EMPNBR IN (select EMPNBR from CLINIC.CLNCVST where VSTDTE='15-May-13')and VSTDTE='15-May-13'
its mesing up any help