| Andi Ihsan 2005-05-21, 8:23 pm |
| I Face the problem in ASA 8.03
I Create procedure in transact-sql mode
Create procedure hms. tax_dokter(@day_name
varchar(20),@DOCTID =
varchar(20),@prov_id
varchar(20))
as
begin
declare @tax_Jm decimal(4,2)
set @tax_Jm=3Dcase upper(@day_name) when 'SUNDAY' then
(select top 1 hms.jm_doctor.tax from
hms.jm_doctor where
hms.jm_doctor.doct_id =3D @DOCTID and upper(jm_hari) =3D 'MINGG=
U' and =
hms.jm_doctor.prov_id =3D @prov_id)
when 'MONDAY' then(select top 1 hms.jm_doctor.tax from
hms.jm_doctor where
hms.jm_doctor.doct_id =3D @DOCTID and upper(jm_hari) =3D 'SENIN=
' and =
hms.jm_doctor.prov_id =3D @prov_id)
when 'TUESDAY' then(select top 1 hms.jm_doctor.tax from
hms.jm_doctor where
hms.jm_doctor.doct_id =3D @DOCTID and upper(jm_hari) =3D 'SELAS=
A' and =
hms.jm_doctor.prov_id =3D @prov_id)
when 'WEDNESDAY' then(select top 1 hms.jm_doctor.tax from
hms.jm_doctor where
hms.jm_doctor.doct_id =3D @DOCTID and upper(jm_hari) =3D 'RABU'=
and =
hms.jm_doctor.prov_id =3D @prov_id)
when 'THURSDAY' then(select top 1 hms.jm_doctor.tax from
hms.jm_doctor where
hms.jm_doctor.doct_id =3D @DOCTID and upper(jm_hari) =3D 'KAMIS=
' and =
hms.jm_doctor.prov_id =3D @prov_id)
when 'FRIDAY' then(select top 1 hms.jm_doctor.tax from
hms.jm_doctor where
hms.jm_doctor.doct_id =3D @DOCTID and upper(jm_hari) =3D 'JUMAT=
' and =
hms.jm_doctor.prov_id =3D @prov_id)
when 'SATURDAY' then(select top 1 hms.jm_doctor.tax from
hms.jm_doctor where
hms.jm_doctor.doct_id =3D @DOCTID and upper(jm_hari) =3D 'SABTU=
' and =
hms.jm_doctor.prov_id =3D @prov_id)
end
return(@tax_Jm)
end
When i execute in ISQL Session
select hms. tax_dokter('MONDAY',
'DR2101- 0000040','PROV021000
1');
return value is 7 (wrong) -> should be 7.5
hms.jm_doctor.tax is decimal(4,2) and value is 7.50
Anyone know this problem ?
I use ASA 8.03.5223
TIA,
Ichank
-- =
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|