Viewing 15 posts - 76 through 90 (of 285 total)
Thanks everyone was able to get the monday's from Getdate()
SELECT DATEADD(wk, -5, DATEADD(DAY, -5-DATEPART(WEEKDAY, GETDATE()), DATEDIFF(dd, 0, GETDATE())))
SELECT DATEADD(wk, -4, DATEADD(DAY, -5-DATEPART(WEEKDAY, GETDATE()), DATEDIFF(dd, 0, GETDATE())))
SELECT...
June 22, 2017 at 1:55 pm
the % for most of them shows 0 ...if it is negative needs to show negative ......normally is this right way to calculate the %varience?
June 13, 2017 at 1:23 pm
Select *,CASE WHEN Currentdate = 0 then (PriorDate * 100.0/ [Date-2])
ELSE
CASE WHEN PriorDate=0 THEN (Currentdate * 100.0 / [Date-2])
...
June 13, 2017 at 1:17 pm
CREATE TABLE Dbo.Percentagecalculation
(
Currentdate int
,PriorDate int
,[7DayAvg] Int
,[14dayavg] Int
,[Date-2] int)
INSERT iNTO Dbo.Percentagecalculation VALUES(607 ,480 ,524 ,506 ,590)
GO
INSERT iNTO Dbo.Percentagecalculation...
June 13, 2017 at 12:50 pm
June 2, 2017 at 11:11 am
May 19, 2017 at 10:47 am
DECLARE @filedirectory NVARCHAR(100) = 'E:\Temp\Filename\'
DECLARE @command NVARCHAR(1000) = 'dir /B "'+ @filedirectory +'"'
IF OBJECT_ID('TEMPDB..#tmp') IS NOT NULL
DROP TABLE #tmp
--Loop through all of the files
CREATE TABLE...
March 30, 2017 at 12:41 pm
March 22, 2017 at 12:44 pm
March 22, 2017 at 12:30 pm
March 13, 2017 at 11:31 am
March 9, 2017 at 12:42 pm
We already have stage Table and first we load to stage and then actual DW. But the requirement mentions to evn stop loading process and send email if you find...
March 9, 2017 at 11:55 am
Viewing 15 posts - 76 through 90 (of 285 total)