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.
SELECT TOP (100) PERCENT CASE WHEN '[148-vwProductGroupSubGroup].Group' = 'ArborFlor' AND [148-vwProductGroupSubGroup].SubGroup = 'Hardwood flooring' THEN 99 ELSE [Order] END AS [Order],
orderline.OrderID, orderheader.OrderNumber, orderheader.DateRequired AS DeliveryDate, orderline.ProductID, product.ProductGroupID, dbo.[148-vwProductGroupSubgroup].[Group ID] AS ParentID,
CASE WHEN salesRep.Name LIKE 'Louis%' THEN 2205 ELSE orderheader.SalesRepID END AS SalesRepID, CASE WHEN salesRep.Name LIKE 'Louis%' THEN 'Louis Howarth' ELSE ISNULL(salesrep.Name,
'Unknown') END AS RepName, orderline.Quantity, orderline.TotalVolume, orderline.InputPerID, per.PerCode, dbo.[148-vwProductGroupSubgroup].[Group] AS ProdGroupName,
dbo.[148-vwProductGroupSubgroup].SubGroup AS SubGroupName,
CONVERT(varchar(10), orderheader.DateTimeCreated, 103) AS createddate,
---CAST(CONVERT(varchar(10), orderheader.DateTimeCreated, 103) AS date) AS createddate,
orderheader.OrderType,
orderheader.DateTimeCreated, orderheader.BranchID, orderheader.Deleted, orderheader.OrderStatus
FROM dbo.Per AS per RIGHT OUTER JOIN
dbo.OrderLine AS orderline INNER JOIN
dbo.OrderHeader AS orderheader ON orderheader.OrderID = orderline.OrderID INNER JOIN
dbo.Product AS product ON product.ProductID = orderline.ProductID INNER JOIN
dbo.[148-vwProductGroupSubgroup] ON product.ProductID = dbo.[148-vwProductGroupSubgroup].ProductID INNER JOIN
dbo.[148-GroupOrder] ON dbo.[148-vwProductGroupSubgroup].[Group] = dbo.[148-GroupOrder].[Group] ON per.PerID = orderline.InputPerID LEFT OUTER JOIN
dbo.SalesRep AS salesrep ON salesrep.SalesRepID = orderheader.SalesRepID
--Where [148-vwProductGroupSubgroup].SubGroup like 'Treated' OR [148-vwProductGroupSubgroup].SubGroup LIKE 'Reg_________measure'
Where [Product].[ProductGroupID] = 2070 OR [Product].productgroupid = 2037 AND
-- [orderheader].DateTimeCreated >= '2020-06-15 00:00:00' and [orderheader].DateTimeCreated <= '2020-06-16 00:00:00'
Select …
CONVERT(varchar(10), orderheader.DateTimeCreated, 103) AS createddate
From…
Where …
[orderheader].DateTimeCreated >= '2020-06-15 00:00:00' and [orderheader].DateTimeCreated <= '2020-06-16 00:00:00'
Select …
CONVERT(varchar(10), orderheader.DateTimeCreated, 103) AS createddate
From…
Where …
[blue]CONVERT(varchar(10), orderheader.DateTimeCreated, 103)[/blue] >= '2020/06/15'
and [blue]CONVERT(varchar(10), orderheader.DateTimeCreated, 103)[/blue] <= '2020/06/16'
SELECT TOP (100) PERCENT CASE WHEN '[148-vwProductGroupSubGroup].Group' = 'ArborFlor' AND [148-vwProductGroupSubGroup].SubGroup = 'Hardwood flooring' THEN 99 ELSE [Order] END AS [Order],
orderline.OrderID, orderheader.OrderNumber, orderheader.DateRequired AS DeliveryDate, orderline.ProductID, product.ProductGroupID, dbo.[148-vwProductGroupSubgroup].[Group ID] AS ParentID,
CASE WHEN salesRep.Name LIKE 'Louis%' THEN 2205 ELSE orderheader.SalesRepID END AS SalesRepID, CASE WHEN salesRep.Name LIKE 'Louis%' THEN 'Louis Howarth' ELSE ISNULL(salesrep.Name,
'Unknown') END AS RepName, orderline.Quantity, orderline.TotalVolume, orderline.InputPerID, per.PerCode, dbo.[148-vwProductGroupSubgroup].[Group] AS ProdGroupName,
dbo.[148-vwProductGroupSubgroup].SubGroup AS SubGroupName,
CONVERT(varchar(10), orderheader.DateTimeCreated, 103) AS createddate,
orderheader.OrderType,
orderheader.DateTimeCreated, orderheader.BranchID, orderheader.Deleted, orderheader.OrderStatus
FROM dbo.Per AS per RIGHT OUTER JOIN
dbo.OrderLine AS orderline INNER JOIN
dbo.OrderHeader AS orderheader ON orderheader.OrderID = orderline.OrderID INNER JOIN
dbo.Product AS product ON product.ProductID = orderline.ProductID INNER JOIN
dbo.[148-vwProductGroupSubgroup] ON product.ProductID = dbo.[148-vwProductGroupSubgroup].ProductID INNER JOIN
dbo.[148-GroupOrder] ON dbo.[148-vwProductGroupSubgroup].[Group] = dbo.[148-GroupOrder].[Group] ON per.PerID = orderline.InputPerID LEFT OUTER JOIN
dbo.SalesRep AS salesrep ON salesrep.SalesRepID = orderheader.SalesRepID
--Where [148-vwProductGroupSubgroup].SubGroup like 'Treated' OR [148-vwProductGroupSubgroup].SubGroup LIKE 'Reg_________measure'
Where [Product].[ProductGroupID] = 2070 OR [Product].productgroupid = 2037
but then if I do 2 days it misses the second date out (exapled between 02/06/2020 and 03/06/2020)
SomeField >= StartDate And SomeField < EndDate + 1