query sql database
It might help if you could describe how you are doing what you have so far.
ADO?
Sounds like something along the lines of
select
table1.item_nr, sum(table2.quantity)
from
table1,table2
where
table1.item_nr = table2.item_nr(+)
group by
table1.item_nr
would do it, but I'm not sure of exact syntax for SQL Server
Tim
"Walter" wrote in message
...
Hello everybody
I need to import in a Excel sheet data from a Microsoft sql database,
I need the filtered data from some fields from one table and from a
other table which needs to be linked with a field the calculated sum from
the many related records.
Table one Table two, item nr.
field to be linked with table one
filtered
item nr-------------------------------------item nr / quantity
quantity
quantity
quantity
---------------------
sum
sheet result
item nr sum (quantity)
I can do everything except get the single result from the summed quantity
field
Anybody a idea how to achieve this?
Thanks
Walter
|