Sub Query retrun many records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nithya jayaraman
    New Member
    • Jul 2007
    • 7

    Sub Query retrun many records

    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=GroupCod e and groupname ,typecode
    ItemMaster include the=ItemCode,It emName and GroupCode ,Rate also

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

    pls help me to slove this problem
  • deepuv04
    Recognized Expert New Member
    • Nov 2007
    • 227

    #2
    Originally posted by nithya jayaraman
    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=GroupCod e and groupname ,typecode
    ItemMaster include the=ItemCode,It emName 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
    [code=sql]
    SELECT ItemMaster.Item Name,ItemMaster .Rate
    FROM TypeMaster INNER JOIN
    GroupMaster ON TypeMaster.Type Code = GroupMaster.Typ eCode INNER JOIN
    ItemMaster ON GroupMaster.Gro upCode = ItemMaster.Grou pCode
    WHERE TypeMaster.Type = 'RawMaterial'
    [/code]

    Comment

    Working...