mvalencia
asked on
Remove period or dot from sql results
I am building a flat file for upload to a vendor. This file should contain no decimal points or periods. My results currently contain a decimal point in the money and a period after the middle initial of the name. I am using cast on the ckhcunetpay field as this returns two decimal places instead of four. In both cases there is data before and after the dot.
How can I remove the dot.
Thanks,
How can I remove the dot.
Thanks,
select
'000000' as start,
ckhcheckno,
'011111111111111100000' as space1,
cast (ckhcurnetpay as char) as amount,
ckheefullname
from
chkhead
where
ckhcheckno > '4177'
Similarly, use the following REPLACE function for ckheefullname -
REPLACE(ckheefullname, '.', '')
REPLACE(ckheefullname, '.', '')
ASKER
Worked great! Thanks very much,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks again for the very quick and very good help.
REPLACE(cast(chkcurnetpay as char), '.', '')