Jump to content

SQL Sum statement


Recommended Posts

Hi guys,

I've just got into this problem which is driving me nuts. I've got a query to return data from 2 tables in my database (MS SQL). Then I'd like to perform a SUM on one of the field returned by the query but I can't find a way to do so.

I've tried this

SELECT SUM(FIELD) FROM (SELECT * FROM TABLE1, TABLE2 WHERE conditions)

but apparently this is not the right way to do it...

Anyone got any idea?

Thanks in advance.

Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...