Hi friends,
Need help with the below select query..
select n_curr, to_number(replace(trim(regexp_replace(nvalue,'[) $[:alpha:]]','')),'(','-')) nvalue from net_prof
where contract_no='415';
n_curr nvalue
------- ------
($6.00) -6
($20.70) -20.7
$16.20 16.2
$19.00 19
($230.48) -230.48
If n_curr value has 4 or more digits like $1,155.00 I get an invalid number error.. I'm not sure if this is because of the comma.. Result should be
n_curr nvalue
-------- --------
$1,155.00 1155
Please help.. Thanks a lot in advance