Hi I have a bit of sql used within excel and I want to convert this to use within SQL Server.
I know I can use the floor function instead of the Rounddown but How do I get the max of the list.
What I have so far is:
Help appreciated.
neemi
Code:
MAX (
ROUNDDOWN ( 1 / Inner_Carton_Dim_Width_M , 0) * ROUNDDOWN ( 1.2 / Inner_Carton_Dim_Length_M, 0) ,
ROUNDDOWN ( 1 / Inner_Carton_Dim_Length_M, 0) * ROUNDDOWN ( 1.2 / Inner_Carton_Dim_Width_M, 0) ,
1
)
I know I can use the floor function instead of the Rounddown but How do I get the max of the list.
What I have so far is:
Code:
(MAX(
FLOOR(1/[Inner_Carton_Dim_Width_M])*FLOOR(1.2/[Inner_Carton_Dim_Length_M]),
FLOOR(1/[Inner_Carton_Dim_Length_M])*FLOOR(1.2/[Inner_Carton_Dim_Width_M]),
1)
Help appreciated.
neemi