SQL Server 2005 SUM -


hey all, query string here:

 select sum(total) total, administratorcode, sum(wod.quantity) thepass     tblwo wo,          tblwod wod  wod.orderid = wo.id   , wo.orderdate between '2010-01-01' , '2010-08-31'   , approved = '1'   order wo.administratorcode 

but keep getting error:

the multi-part identifier "tblwod.quantity" not bound.

any great!

thanks,

david

solved!!!

you need use sum(wod.quantiy) (or maybe quantity unless column name missing t)

you have aliased table here tblwod wod have no table exposed correlation name tblwod


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -