Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all
Im new in QV
i have 2 fields like this.
load * inline [
type, weight
normal, 0.2
express, 0.8
saver, 2.4
express, 1.1
normal, 0.7
....
];
is it possible to use ceil() each types?
Hi Muncho,
I hope is this what do you want.
OriginalTable:
load * inline [
type, weight
normal, 0.2
express, 0.8
saver, 2.4
express, 1.1
normal, 0.7
//....
];
NewTable:
load
type as Type
,ceil(weight) as Weight
resident OriginalTable;
drop table OriginalTable;
Hi Muncho,
Yes, it is possible to use ceil().
Take resident of our inline table
new_table:
load
type,
ceil(weight) as weight
resident inline_table;
Drop table inline_table;
Hope you get it.
Regards,
Yogesh
No, no you guys get it wrong.
I need ceil it different for each types.
like normal weights ceil(weight), and express(weigh, 0.5) etc.
Hi Mucho,
if you have 3 or 4 attributes in type field, try to use
if condition as
if(type='normal', ceil(weight),
if(type='express', ceil(weight, 0.5),
........
))) as new_weight,
hope this help you.
Thanks & Regards,
Yogesh
Hi Yogesh.
Can i ask you 1 more thing again?
how about this one
express, 0.5
express, 1
express, 1.5
......
express, 10
express, 11
express,12
so on.
i need to ceil 0.5 in under 10 and ceil 1 in after 10.
I wanna end it today. Please someone help me : [
Hi,
use the clause WHERE weight<=10 when you create your new table and make other WHERE for weight>10.