I populate the above table via a DTS and have checked and verified that correct data and # of rows and coming in.
I have a product master table... for business reasons we can have the
same product created with different ProductCodes though the rest of the
Product details are EXACTLY the same. We have covered this using a field named 'UniqueProdCode'.
... many other product fields e.g. unit price, category etc...
Please note that I have NOT defined a link between the table
'SalesFACT' and table ProdMaster in the diagram editor... When you
kindly reply, please also suggest if linking these in the diagram editor
is a good practice and should I do so?? Please guide... I also do not have Primary keys defined for any table
When I do a count(*) query on the table 'SalesFACT', I get the correct
number of records. AND this is where the problem is:
If I create a view, add table 'SalesFACT' and table ProdMaster, link the
UniqueProdCode field of table 'SalesFACT' with the UniqueProdCode field of ProdMaster (so that I can also get the name, category, etc. for the products in the SalesFACT), and run the same count(*) query I get a much higher number than the original ???
Please guide... I have run out of all the things that I could check and
thus this SOS and F1.
Here is how I created the view...can send you the DDL if you still need it??
1. Right click in the view pane
2. Selected New view
3. Added the 2 tables (SAlesFACT and ProdMaster)
4. Dragged the UniqueProductCode FROM the ProdMaster table TO the
5. Selected all fields from SalesFACT table and only a few fields from
the ProdMaster table
6. Saved the view
7. Ran the view (selected display all records option)