Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Num in the script

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

5 Replies
sunny_talwar

Not sure, but may be this:

Num(Field1/(Field2*10), '##.#########') as AnotherField

alexpanjhc
Specialist
Specialist

C1:

load * inline  [

field1, field2

157,16

]

;

C:

load *,

num(field1/(field2*10),'#.####') as newfield

resident C1;

drop table C1;

sunny_talwar

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;

Anonymous
Not applicable

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

bohravanraj
Partner - Creator II
Partner - Creator II

num(157/(16*10),'##.#####')