Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.
DECLARE @DT DATETIME, @TimeKey INT SET @Dt = Convert(DateTime,Convert(VarChar,GetDate(),101)) SET @TimeKey = (SELECT TimeKey FROM CommonDW.dbo.dimTime WHERE FullDateAlternateKey = @Dt) SELECT @TimeKey -- Test to be sure it is still the current month. MonthInd should be 0. DROP TABLE #CurrentMonth SELECT * INTO #CurrentMonth FROM ( SELECT MonthStart, MonthEnd, MonthInd FROM tblMonth_Quarter M WHERE @TimeKey BETWEEN MinMonthKey AND MaxMonthKey AND MonthInd = -1 )t -- if it is not the curent month any longer, I want to set the MonthInd to -1. IF @@ROWCOUNT = 0 BEGIN -- Update the table UPDATE M SET MonthInd = -1 FROM tblMonth_Quarter M WHERE @TimeKey > (SELECT MAX(MaxMonthKey) FROM tblMonth_Quarter WHERE MonthInd = -1) END
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
20 Experts available now in Live!