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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to summ in horizontal, SQL Query

Status
Not open for further replies.

2009luca

Programmer
Jul 27, 2013
222
IT
Attached there is the sheet with a structure of my Access table1.

I need with a SQL to summ (and with a Where clausole on the first 3 fields), the value from field4 to field8, but in horizontal...!

i my case:

first row in table the summ is 17, second row is 6

how to?

note:
i use ado, vb6 and Access database
 
 http://files.engineering.com/getfile.aspx?folder=da451abf-1ddf-42be-b722-84d8268b804f&file=table1.zip
How about
"SELECT (field4 + field5 + field6 + field7 + field8) as field9 FROM Table WHERE Field1 = 'AAA' AND Field2 = 'BBB' AND Field3 = 'CCC'"

David Paulson

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top