Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
mSQL = "SELECT Site.Region, count(distinct Site.Prop_Ref_No) as Stockists, PRODUCT_DIM.PRODUCT_TIE_TYPE_DESC, Calendar.Punch_Year_Per, Sum (Product_Sale_Weekly_Sum.Volume_Barrels) as Vol_Pd " & _
"FROM Product_Sale_Weekly_Sum, Site, Calendar, PRODUCT_DIM " & _
"WHERE ( Product_Sale_Weekly_Sum.Product_key=PRODUCT_DIM.PRODUCT_KEY ) " & _
"AND ( Product_Sale_Weekly_Sum.Process_date_key=Calendar.TIME_KEY ) " & _
"AND ( Site.Site_Key=Product_Sale_Weekly_Sum.Site_key ) " & _
"AND ( PRODUCT_DIM.PRODUCT_TIE_TYPE_DESC NOT IN ('CONTAINER', 'GASES', 'N/A', 'OTHER') " & _
"AND Calendar.Punch_Year_Per BETWEEN '" & [SYP] & "' AND '" & [EYP] & "' ) " & _
"AND Calendar.Punch_Year_Per !='2002 14'" & _
"Group BY Site.Region, PRODUCT_DIM.PRODUCT_TIE_TYPE_DESC, Calendar.Punch_Year_Per " & _
"HAVING ( Sum (Product_Sale_Weekly_Sum.Volume_Barrels) > 0 ) " & _
"ORDER BY Site.Region, PRODUCT_DIM.PRODUCT_TIE_TYPE_DESC,Calendar.Punch_Year_Per"
sConnect = "ODBC;" & _
"DSN=KnowledgeQuery;" & _
"Description=Punch Pubs KMS Database;" & _
"UID=barracg;" & _
"APP=Microsoft Office XP;" & _
"WSID=L0001788;" & _
"DATABASE=KnowledgeQuery;" & _
"LANGUAGE=British;" & _
"Network=DBMSSOCN;" & _
"Trusted_Connection=Yes"
With Sheets("Base")
With .QueryTables(1)
.Connection = sConnect
.CommandText = mSQL
.Refresh BackgroundQuery:=False
End With
End With