SQL Join
-
Hi, I have the following tables: Request Table: (RequestID, Request Description, QuoteID) Quote Table: (QuoteID, QuoteNumber) If I have 1 Quote Record. This quote record is assigned to 3 different Requests. I want a VIEW of those tables with a JOIN which will display: vw_QuoteRequest: ================ QuoteID 1 I DO NOT want it to display: vw_QuoteRequest: ================ QuoteID 1 1 1 I hope you see what I mean. Thank you.
-
Hi, I have the following tables: Request Table: (RequestID, Request Description, QuoteID) Quote Table: (QuoteID, QuoteNumber) If I have 1 Quote Record. This quote record is assigned to 3 different Requests. I want a VIEW of those tables with a JOIN which will display: vw_QuoteRequest: ================ QuoteID 1 I DO NOT want it to display: vw_QuoteRequest: ================ QuoteID 1 1 1 I hope you see what I mean. Thank you.
What else do you want to display? I assume it's not just the QuoteID because if it was, you would just do SELECT DISTINCT QuoteID.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before. -
What else do you want to display? I assume it's not just the QuoteID because if it was, you would just do SELECT DISTINCT QuoteID.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.Actually I dont want to display anything. I have another table totalling 3: Stage (StageID, StageNumber, ProjectID) Request (RequestID, RequestNumber, RequestDescription, QuoteID) Quote (QuoteID, QuoteNumber) What I need to do is get a link between Quote and Stage. This will also provide a link to the Project Table. I can only obtain this link if I go through the request table. The reason I want this link is because I am querying the table according to projects and stages, which will return a set of Quotes based on that. NOTE: This view will be used as part of another view, therefore this view will not be displaying anything. However, Examining the senario I posted initially, you can see that my view will return 3 instances of the quote because the same quote ID is present in 3 different requests :( I hope this is clear. Please do not hesistate to ask about anything, or even suggest better methods of implementation. Thank you for your time.
-
What else do you want to display? I assume it's not just the QuoteID because if it was, you would just do SELECT DISTINCT QuoteID.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.