If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
CALCULATION
Could someone please execute this SQL statement into Access?
CREATE TABLE #tmp ( RowID INT IDENTITY(1,1) NOT NULL, Injection NUMERIC(16,4) NOT NULL, WidthDrawl NUMERIC(16,4) NOT NULL, Inventory NUMERIC(16,4) NULL) INSERT INTO #tmp (Injection, Widthdrawl) VALUES (0, 0) --5504.8 INSERT INTO #tmp (Injection, Widthdrawl) VALUES (16.4, 0) INSERT INTO #tmp (Injection, Widthdrawl) VALUES (60.8, 0) INSERT INTO #tmp (Injection, Widthdrawl) VALUES (61.1, 0) INSERT INTO #tmp (Injection, Widthdrawl) VALUES (63.1, 0) INSERT INTO #tmp (Injection, Widthdrawl) VALUES (60.7, 0) select * from #tmp SELECT t1.*, ISNULL(t1.Inventory, 5504.8) + t1.Injection - t1. Widthdrawl FROM #tmp t1 -- Start JOIN #tmp t2 -- End ON t1.RowID = t2.RowID – |
Thread Tools | |
Display Modes | |
|
|