Skip to content

Instantly share code, notes, and snippets.

@PeterLehmann
PeterLehmann / promotion.sql
Created December 8, 2011 09:48
promotion default query
select ic.ItemCodeNo
, il.ItemLocalId
, i.ItemNo
, ru.RetailUnitNo
, pil.StartDate
, pil.EndDate
, pp.PromotionPOSNo
, pp.StartDateTime
, pp.EndDateTime
, promotionLineStatus.Code as "promotion line status code"
@PolarbearDK
PolarbearDK / EODandSOD.sql
Last active December 29, 2015 08:09
Monitor status of EOD and SOD
-- Change 0 to -1 yesterday, -2 day before, ect.
DECLARE @date DATETIME = DateAdd(Day, 0, GetDate());
DECLARE @startedLaterThan DATETIME = DateAdd(Hour, -18, @date);
DECLARE @businessDate DATE = DateAdd(Day, +1, CAST(@startedLaterThan AS DATE));
-- To see details about each store, remove (comment out) this summary header (up to "FROM ("), and footer (last two lines)
SELECT
AccountingDate
,"Store Type"
@marcind
marcind / gist:9512656
Last active November 11, 2020 14:58
Disable "Always start when debugging" for all projects in a solution
# Execute this in Nuget powershell console
get-project -all | %{ $_.Properties | ?{ $_.Name -eq "WebApplication.StartWebServerOnDebug"} | %{ $_.Value = $False } }
#