By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,341 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,341 IT Pros & Developers. It's quick & easy.

Sub Query retrun many records

P: 7
Hi

i have a 3 tables

1. typemaster
2.groupmaster
3.item master
typemaster have two fields=typecode and type name
GroupMaster have three fields=GroupCode and groupname ,typecode
ItemMaster include the=ItemCode,ItemName and GroupCode ,Rate also

now if the type is rawmaterial means have display itemName,Rate

pls help me to slove this problem
Mar 10 '08 #1
Share this Question
Share on Google+
1 Reply


deepuv04
Expert 100+
P: 227
Hi

i have a 3 tables

1. typemaster
2.groupmaster
3.item master
typemaster have two fields=typecode and type name
GroupMaster have three fields=GroupCode and groupname ,typecode
ItemMaster include the=ItemCode,ItemName and GroupCode ,Rate also

now if the type is rawmaterial means have display itemName,Rate

pls help me to slove this problem
hi,
since you are specifying the type you may get multiple records that will come under the type given.
can you explain exactly what you want with an expmple .

the query for retriving itemname and rate based on type is
Expand|Select|Wrap|Line Numbers
  1. SELECT ItemMaster.ItemName,ItemMaster.Rate
  2. FROM TypeMaster INNER JOIN
  3.      GroupMaster ON TypeMaster.TypeCode = GroupMaster.TypeCode INNER JOIN
  4.      ItemMaster ON GroupMaster.GroupCode = ItemMaster.GroupCode
  5. WHERE TypeMaster.Type = 'RawMaterial'
  6.  
Mar 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.