Hello Ladies & Gentlemen I am having some trouble linking data in a view. I was hoping someone could help me. I have the following Tables with the following fields. Table: SB, Field: Serial# Table: IDEAS, Field: DESC Table: HSTRY_LINE, Field: DP# Table: HSTRY_HEAD, Fields: TERR#, CUST#, SHIP-DATE I need to create a view which will display the corresponding data from each Table listed above. I am having trouble getting the correct result. Could you good people help please. Thanks in advance opharoah_35
Moved article from General DBA Questions. Post the code for the view and then may be we can help. Gaurav Moderator Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard
Thanks for your responce. I will provide as much information as I can. Table: SB, Field: Serial# (Contains the Serial Number of the item purshased. Table: IDEAS, Field: DESC (Contains the description of the item purshased. Table: HSTRY_LINE, Field: DP# (Contains the part number of the item purshased. Table: HSTRY_HEAD, Field: TERR#, CUST#, SHIP-DATE (Contains the Territory number, Customer number & Ship-Date of the item purshased. I need to link the Serial# to the Description, Territoty number, Customer number & Ship-date per item based on Territory number (TERR#). This is the information I need to see in the view and/or a stored proceedure. (But given that I am new to SQL) I am not familar with stored proceedures. I hope this provided the information you need in order to assist me with this problem. Thanks in advance pharoah35
What is the link between these tables? Are you missing any columns? Post the code for the complete tables as well. Gaurav Moderator Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard
Speculation: The link could most likely be the Item serial# from pharaohs short description. Use a join (inner or outer as appropriate) on the Serial# between the tables and filter on the Territory#. Nathan H.O. Moderator SQL-Server-Performance.com