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 |
|
anjali5
Posting Yak Master
121 Posts |
Posted - 2010-08-17 : 13:03:28
|
| I have four tables, I need to write the query that returns all widgets with a widget type code of “red” and also a query that return all widgets, , widget types and master widget types when the widget type is “blue.”. I need to return all values whether or not a widget naster type exists for each widget. Below is the schema for all the tablestblWidgetWidgetID INT PK IDENTITYWidgetTypeID SmallINT FK1Code varchar (15) AK1Name VarChar (30)Description VarChar (250) NULLtblWidgetTypeWidgetTypeID INT PK IDENTITYWidgetMasterTypeID TinyINT NULLTypeCode VarChar (10) AK1Name VarChar (30)Description VarChar (250) NULLtblWidgetMasterTypeWidgetMasterTypeID TinyINT PK IDENTITYTypeCode VarChar (10) AK1Name VarChar (30)Description VarChar (250) NULLtblUserUserID SmallInt PK IDENTITYUserNumber SmallINT AK1FirstName VarChar (50)LastName VarChar (50)tblWidgetUserWidgetUserID Int PK IdentityWidgetID INT AK1 FK1UserID INT AK1 FK2 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-08-17 : 13:07:10
|
| is this a assignment question? can we see what you tried yet?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
slimt_slimt
Aged Yak Warrior
746 Posts |
Posted - 2010-08-17 : 13:09:54
|
| please provide some sample data and desired output |
 |
|
|
|
|
|