A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

CALCULATION



 
 
Thread Tools Display Modes
  #1  
Old October 4th, 2006, 08:24 PM posted to microsoft.public.access.queries
mbynoe
external usenet poster
 
Posts: 3
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.