I have a table that has a container type (in this case) depicted by a series of 20 numbers, i.e. 00000415401049837981. I need to count the records where the container type = '00000415401049837981' or any other 20 digit number. I want the statement to count the number of pallets on a load, if the container is a pallet, it will have a 20 digit number if it is not a pallet the field will be blank. The statement that I am using is:
CASE WHEN [P_Outbound].[CHCART00 - Carton Header].[Pallet #]>0 [P_Outbound].[CHCART00 - Carton Header].[Pallet #] ELSE null END
What am I doing incorrectly. It will not return anything. I did not ask it to count because the program I am using has an aggregate function that I can use after i narrow down the proper function.
CASE WHEN [P_Outbound].[CHCART00 - Carton Header].[Pallet #]>0 [P_Outbound].[CHCART00 - Carton Header].[Pallet #] ELSE null END
What am I doing incorrectly. It will not return anything. I did not ask it to count because the program I am using has an aggregate function that I can use after i narrow down the proper function.