I tried following in Sybase
SELECT ChrgAmt, REPLACE(convert(varchar(255),ChrgAmt), '.', '') AS Result
FROM PaymentSummary
But it gives below error in isql
Incorrect syntax near the keyword 'REPLACE'.
What could be the possible reason
Thanks
On Sybase ASE there is str_replace funciotn
SELECT ChrgAmt, str_replace(convert(varchar(255),ChrgAmt), '.', '') AS Result
FROM PaymentSummary
you can also use cast instead of convert
as below
SELECT ChrgAmt, str_replace(cast(ChrgAmt as varchar(255)), '.', '') AS Result
FROM PaymentSummary