Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using same table to Add data

Status
Not open for further replies.

alex98

Technical User
Jun 7, 2006
2
RU
I have one table:

cno date cname proj1 proj2 proj3
--- ----- ----- ----- ----- ----
101 01/01 john 50 60 70
101 02/01 tom 40 50 90
103 03/01 mike 30 20 10

My two keys are CNO and DATE.
I don't know how to write a query that would
perform an arithmetic fucntion of two consecutive dates or any dates, for example:

ADD proj1 of 101 (50) to proj2 of 101 OR
ADD proj1 of 101 (40) to proj3 of 101.

ON SQL Server....
 
I need to add proj1 to proj2 of dates 01/01 and 01/02, keeping in mind that this is in one table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top