Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one field in my database suppose name as quantity.
Quantity |
---|
1 |
2 |
3 |
-4 |
-5 |
-6 |
I need Quantity field as only positive values in it in back end script only like :
Quantity |
---|
1 |
2 |
3 |
4 |
5 |
6 |
Kindly help.
Regards,
Mahamed
may be this
fabs(Quantity) as field
If you want to convert - ve value in +ve then use fabs()
or
if you want only +ve value then in where clause you can write
where Quantity>=0
Regards
if you need only +value s when you use the where condition in the script like
LOAD *
from
table
where Quantity>=0
Hi,
Also you can try purgechar(Fieldname,'-') or fabs() according to your format..