Can someone explain what the "First." functions in MS ACCESS are doing here and how can I convert this to a SAS query? is it just reomving duplicate data? I'm not well versed in ms access. Thanks for any help you can provide! SELECT [2h CustPVM >109000].CUSTOMER_NUMBER,
[2h CustPVM >109000].CUSTOMER_NAME,
[2h CustPVM >109000].ZIP5_CODE,
[2h CustPVM >109000].CITY,
[2h CustPVM >109000].STATE,
[2h CustPVM >109000].CBSA,
First([2h CustPVM >109000].SALES_DISTRICT_CODE) AS SALES_DISTRICT_CODE,
First([2h CustPVM >109000].SALES_DISTRICT_DESC) AS SALES_DISTRICT_DESC,
First([2h CustPVM >109000].SALES_GROUP_CODE) AS SALES_GROUP_CODE,
First([2h CustPVM >109000].SALES_GROUP_DESC) AS SALES_GROUP_DESC,
[2h CustPVM >109000].CUSTOMER_GROUP1,
[2h CustPVM >109000].CUSTOMER_GROUP1_DESC,
[2h CustPVM >109000].IDN, [2h CustPVM >109000].CUSTOMER_GROUP2,
[2h CustPVM >109000].CUSTOMER_GROUP2_DESC,
[2h CustPVM >109000].[GPO Name],
[2h CustPVM >109000].F400,
[2h CustPVM >109000].MATERIAL_NUMBER,
[2h CustPVM >109000].MATERIAL_DESC,
[2h CustPVM >109000].LEVEL5_DESC_CATEGORY,
[2h CustPVM >109000].LEVEL4_DESC_CLASS,
[2h CustPVM >109000].BUSLINE,
[2h CustPVM >109000].BUSLINE_DESC,
[2h CustPVM >109000].BUSLINE_GROUPING_3,
[2h CustPVM >109000].BUSLINE_GROUPING_2,
[2h CustPVM >109000].BUSLINE_GROUPING,
[2h CustPVM >109000].ORTHO_DIVISION,
[2h CustPVM >109000].ALT_LEVEL1_DESC,
[2h CustPVM >109000].ALT_LEVEL2_DESC,
First([2h CustPVM >109000].PROMO) AS PROMO,
First([2h CustPVM >109000].[Promo Description]) AS [Promo Description],
First([2h CustPVM >109000].[Pricing Type]) AS [Pricing Type],
Sum([2h CustPVM >109000].YTDPYNET_QTY) AS YTDPYNET_QTY,
Sum([2h CustPVM >109000].YTDPYNET_SALES) AS YTDPYNET_SALES,
Sum([2h CustPVM >109000].YTDPYGROSS_SALES) AS YTDPYGROSS_SALES,
Sum([2h CustPVM >109000].YTDPYCOST_OF_SALES) AS YTDPYCOST_OF_SALES,
Sum([2h CustPVM >109000].YTDCYNET_QTY) AS YTDCYNET_QTY,
Sum([2h CustPVM >109000].YTDCYNET_SALES) AS YTDCYNET_SALES,
Sum([2h CustPVM >109000].YTDCYGROSS_SALES) AS YTDCYGROSS_SALES,
Sum([2h CustPVM >109000].YTDCYCOST_OF_SALES) AS YTDCYCOST_OF_SALES,
Format([STPWeightedGrwth],"0.00000%") AS STPWeightedGrwthString
FROM [2h CustPVM >109000]
GROUP BY [2h CustPVM >109000].CUSTOMER_NUMBER, [2h CustPVM >109000].CUSTOMER_NAME, [2h CustPVM >109000].ZIP5_CODE, [2h CustPVM >109000].CITY, [2h CustPVM >109000].STATE, [2h CustPVM >109000].CBSA,
[2h CustPVM >109000].CUSTOMER_GROUP1, [2h CustPVM >109000].CUSTOMER_GROUP1_DESC, [2h CustPVM >109000].IDN, [2h CustPVM >109000].CUSTOMER_GROUP2, [2h CustPVM >109000].CUSTOMER_GROUP2_DESC,
[2h CustPVM >109000].[GPO Name], [2h CustPVM >109000].F400, [2h CustPVM >109000].MATERIAL_NUMBER, [2h CustPVM >109000].MATERIAL_DESC, [2h CustPVM >109000].LEVEL5_DESC_CATEGORY,
[2h CustPVM >109000].LEVEL4_DESC_CLASS, [2h CustPVM >109000].BUSLINE, [2h CustPVM >109000].BUSLINE_DESC, [2h CustPVM >109000].BUSLINE_GROUPING_3, [2h CustPVM >109000].BUSLINE_GROUPING_2,
[2h CustPVM >109000].BUSLINE_GROUPING, [2h CustPVM >109000].ORTHO_DIVISION, [2h CustPVM >109000].ALT_LEVEL1_DESC, [2h CustPVM >109000].ALT_LEVEL2_DESC, Format([STPWeightedGrwth],"0.00000%");
... View more