Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
Is there a simple way or does anyone have anyway to turn negative strings with () into -.
example of field data:
9056
11209
(495)
(44245)
49300
I can't refresh your application, but I think that the issue comes from "," like in "-3,412".
"-3,412" is -3412 or -3.412 for you ?
try Num#(replace(replace(replace(value, '(', '-'), ')', ''), ' ',''))
Look to this thread for the eventually answer to this stream.
The replace() thing looks too complex to me. I would do it like this:
num(num#(value, '#;(#)'), '#;-#')
-Rob
HI Rob, the solutions works fine for me....but my problem is that I am having character - also in my fields for ex.
100
(0.1)
50
40
200
-
10
(0.23)
-
In such case the values (0.23) gets converted to -0.23 but - values remains as it is..Ideally it should be converted to 0 to work with operators.
I am putting my query into the same thread as my query is an extension to the samequery
. Do suggest If i need to put up this into a new thread.
Thanks
Lax.
You can replace the - values with either an if() or a map. For example,
if(myfield='-',0,myfield) as myfield
-Rob