Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
alisag
Starting Member
5 Posts |
Posted - 2014-05-28 : 04:53:17
|
Hi,I have a TABLE called Item and from this Table I Need Item No. & Item Description. There is a Table called Item Ledger and from This Table I Need Sum of Remaining Quantities. So i wrote my Query like,Select Item.No_,Item.Description,SUM(ILE.[Remaining Quantity]) AS InventoryFrom dbo.[123 FC$Item] as ItemINNER JOIN dbo.[123 FC$Item Ledger Entry] As ILE ONItem.[No_] = ILE.[Item No_]Lets say i have another Table called BIN( An Item Can have many BINs) which have PK as Item no. AND Bin No.. Now the BIN Quantity is calculated from a Warehouse Table.So how can I show the report in the below format, Item No. Description Inventory Bin No. Quanity XXXX XXXXXXX 10-------------------------------------- A 2-------------------------------------- B 6-------------------------------------- C 2 |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-05-28 : 07:48:21
|
Please post:1. DDL (Create Table commands) for each table involved2. DML (INsert into commands) to populate each table with sample data3. The desired result of the query you need. |
|
|
|
|
|