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.
I've declared an @AsOf variable because I will eventually put this in a stored procedure and pass that value as a parameter. At the moment, it is set to NULL to select all of the records from vw_Cygnet_Tank_Readings_In
USE WHR_System_Tables DECLARE @AsOf as datetime2(7) SELECT @AsOf = NULL UPDATE tbl_Readings_Tanks SET tbl_Readings_Tanks.Inches_End = T.Inches , tbl_Readings_Tanks.Closing_Vol = (CTRI.Inches/12) * (3.14159 * (ET.Diameter/2) * (ET.Diameter/2)) * 0.17811 FROM ( SELECT ET.Equip_ID , CTRI.FacilityID , CTRI.DT_Recorded , CTRI.Product_ID , CTRI.TankNum , CTRI.Inches , ET.Diameter , Closing_Vol = (CTRI.Inches/12) * (3.14159 * (ET.Diameter/2) * (ET.Diameter/2)) * 0.17811 FROM dbo.vw_Equipment_Tanks as ET INNER JOIN dbo.vw_Cygnet_Tank_Readings_Inches as CTRI ON ET.DS_PK_Text = CTRI.FacilityID AND ET.Product_ID = CTRI.Product_ID AND ET.Tank_Num = CTRI.TankNum WHERE (@AsOf IS NULL) OR (CTRI.Dt_recorded > @AsOf) ) as T INNER JOIN tbl_Readings_Tanks as RT ON T.Equip_ID = RT.Equip_ID AND T.DT_Recorded = RT.docDate WHERE RT.Inches_End <> T.Inches
|Error message when scheduling a job using a linked Server||12||40|
|SQL 2008 R2 Installation on Hyper-V VM||2||29|
|How to check data in sql table||11||31|
|SQL - combining multiple records into 1 record||5||17|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
17 Experts available now in Live!