on 05-01-2012 5:41 PM
Experts,
Because my Customer will pack several different items into a Carton for delivery, I created a Row UDF (RDR1.U_Carton) to calculate the carton fraction that will be used. This works in the lines.
Now I want to have a Header UDF (ORDR.U_CartonCount) populate with the sum of all the Carton fractions (RDR1.U_Carton) in the lines. And round to higest number, so no fractions is showing on this field.
Can anyone help me on how this Formatted Search will look?
Thanks,
Marli
Hi
Try this
select ceiling(sum($[rdr1.U_carton]))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jitin,
Thanks, I tried this and got the error "data type nvarchar invalid for sum operator".
I tried the ORDR.U_CartonCount field as Rate and Numeric, and the RDR1.U_Carton as Rate and Numeric. I also tried adding a Convert() function, but this gave me an error - probably because I did something wrong.
I need the RDR1.U_Carton field to have fractions, and therefore choose Rate.
The ORDR.U_CartonCount field can be anything, as I need whole numbers there.
Thanks for your help.
Marli
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.