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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 queries

Author  Topic 

packymyles
Starting Member

21 Posts

Posted - 2008-04-24 : 00:21:10
how do i make a querie that finds relations to a "part number" for models, and assemblies, but when it finds a relation of part number with a Product, it gives additional attributes for information?
this code that i have so far doesn't do waht i want,, showing

part_number
2 2 1 1 Kilimanjaro
2 2 2 2 Dolomiti
2 2 11 11 Mud Zinger 1

and jumbling up information

select part_inventory.part_number, assemble.assemble_number, model.model_number, product.serial_number, model.model_name
from part_inventory inner join model_configuration on part_inventory.part_number = model_configuration.part_number
inner join model on model.model_number = model_configuration.model_number
inner join assembly_configuration on part_inventory.part_number = assembly_configuration.part_number
inner join assemble on assemble.assemble_number = assembly_configuration.assembly_number
inner join product on product.serial_number = model.serial_number
where part_inventory.part_number = 2;



tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-24 : 00:23:15
Describe what jumbling up means.

Did you fix model.serial_number?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

packymyles
Starting Member

21 Posts

Posted - 2008-04-24 : 00:48:57
yeah i did thanks:)
basically i mean i want it to find assemblies that relate to a specific part, and models that use that part, and products that use that same part, but when it finds products i want it to query differently, providing product, and other attributes that are part of the product table
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-24 : 01:20:06
can you illustrate your requirement with some sample data?
Go to Top of Page
   

- Advertisement -