Jump to content

Error: operand should contain 1 column(s)


raindrops87

Recommended Posts

hi can anybody help me with this query?

 

select rawmatno, rawmatname, qty from compofrawmat join rawmaterials on compofrawmat.rawmatno = rawmaterials.rawmatid where ProductId in(select ProductId, sum(Quantity)

from (customerorderform join cofdetails on customerorderform.OrderNo = cofdetails.OrderNo) natural join finishedproduct where customerorderform.DatePickUp >= adddate(curdate(), interval 3 month) and customerorderform.DatePickUp <= adddate(curdate(), interval 6 month) group by ProductName)

 

when i use this i get an error that says operand should contain 1 column(s) but if i remove sum(Quantity) it works but i need to add the quantity of the finishedproducts by id to multiply it to the qty of its raw materials.

 

any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/226531-error-operand-should-contain-1-columns/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.