Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. select d.CatalogNo,d.Manufacturer,d.Name, sum(quantity)
  2. from DeviceInstance di
  3. full join Device d
  4. on d.Id=di.DeviceId
  5. group by di.DeviceId
  6.  
  7. Column 'Device.CatalogNo' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
  8.  
  9. group by d.DeviceId, d.CatalogNo,d.Manufacturer,d.Name
  10.  
  11. select d.CatalogNo,d.Manufacturer,d.Name, sum(quantity)
  12. from DeviceInstance di
  13. full join Device d
  14. on d.Id=di.DeviceId
  15. group by d.Name, d.CatalogNo,d.Manufacturer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement