Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hey all,
my question is
i have too field one has the value of 157 and the second is 16
I need to create a field on the script that will give me the exact number of 157/(16*10)=0.98125 not 0.98
hope you can help
Not sure, but may be this:
Num(Field1/(Field2*10), '##.#########') as AnotherField
C1:
load * inline [
field1, field2
157,16
]
;
C:
load *,
num(field1/(field2*10),'#.####') as newfield
resident C1;
drop table C1;
Using Alex's example, it seems that without num() function seems to work the best:
C1:
load * inline [
field1, field2
157,16
];
C:
LOAD field1/(field2*10) as newfield
resident C1;
Hi Mario,
Just define the format that you want for the new field. Like the examples below
Num(Field1/(Field2*10), '##.#########')
or
Num(Field1/(Field2*10), '##.#####')
Regards,
Nandha
num(157/(16*10),'##.#####')