I think many of you may be able to give me a quick answer. I have a
table where I need to load and combine rows with like item numbers
and total the qty associated with each. The problem is I need
information from each row in the table that is not unique along with
the invitem feild and totaled qty. So I am not able to include these
fields in a select statement with group by clause.
What is the easiest way to retrieve the addtional feilds for each
item.
example of similar data
Qty Item desc order number random comment
10 ABC Widget 10145 hello
20 ABC Widget 10149 big test
15 ABC Widget 10150 Hello
10 DEF pencil 12312 need many
5 DEF pencil 11233 need 1
I would need to total qty for each item and retrieve the other
fields into a single datagrid row for each item. I know I can
combine them with code after they are retrieved but wanted to do it
with a SQL statement if possible.
current statment below but does not goup by invitem because of a few
non unique feilds
select line_num,qty,sum(qty) as
bqty ,qtys,invitem,invdesc,cost,order_lines.cf,total,inventory.packin
g,material,iteml,width,height,order_lines.vendor,newreqqty,newreqcf,o
rder_num
from Order_lines,inventory
where (order_num='200575293' or order_num='200575294' or
order_num='200575295' or order_num='200575296')
and invitem=inventory.num group by invitem ,qty,linenum,
qtys,invitem,invdesc,cost,order_lines.cf,total,inventory.packing,mate
rial,iteml,width,height,order_lines.vendor,newreqqty,newreqcf,order_n
um
Thanks for any help.
Wade
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/