Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. List products sold to buyers

List products sold to buyers

Scheduled Pinned Locked Moved Database
help
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    freshonlineMax
    wrote on last edited by
    #1

    Hi, I want to list cares sold to buyers from two tables : BuyersTable & ProductsTable I want to get below result : Buyer Product

    Tom Benz
    Bmw
    Volvo
    Jim Bmw
    Benz

    Tanks for help.

    _ 1 Reply Last reply
    0
    • F freshonlineMax

      Hi, I want to list cares sold to buyers from two tables : BuyersTable & ProductsTable I want to get below result : Buyer Product

      Tom Benz
      Bmw
      Volvo
      Jim Bmw
      Benz

      Tanks for help.

      _ Offline
      _ Offline
      _Damian S_
      wrote on last edited by
      #2

      You are looking at a simple inner join here between a few tables. I would assume your lecturer covered this. It will be in the form of: Select BuyerName, ProductName from tblBuyer inner join tblBuyerProduct on BuyerID = BP_BuyerID inner join tblProduct on BP_ProductID = ProductID order by BuyerName, ProductName This assumes you have a standard table setup - tblBuyer (for buyer details), tblProduct (for Product Details) and tblBuyerProduct to create a many to many link between Buyers and Products.

      I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! If you need a laugh, check out my Vodafone World of Difference application | If you like cars, check out the Booger Mobile blog | If you feel generous - make a donation to Camp Quality!!

      F 1 Reply Last reply
      0
      • _ _Damian S_

        You are looking at a simple inner join here between a few tables. I would assume your lecturer covered this. It will be in the form of: Select BuyerName, ProductName from tblBuyer inner join tblBuyerProduct on BuyerID = BP_BuyerID inner join tblProduct on BP_ProductID = ProductID order by BuyerName, ProductName This assumes you have a standard table setup - tblBuyer (for buyer details), tblProduct (for Product Details) and tblBuyerProduct to create a many to many link between Buyers and Products.

        I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! If you need a laugh, check out my Vodafone World of Difference application | If you like cars, check out the Booger Mobile blog | If you feel generous - make a donation to Camp Quality!!

        F Offline
        F Offline
        freshonlineMax
        wrote on last edited by
        #3

        Dear Friend Thank you for reply But i want to list products with none repeatitve buyers, all queries list data and repeat buyer's name at each row, I want result like below :

        Buyer Product
        Jack BMW
        Benz
        Volvo
        Tom Benz
        Toyota
        Ed BMW
        Volvo
        Citruen

        Please help...

        _ 1 Reply Last reply
        0
        • F freshonlineMax

          Dear Friend Thank you for reply But i want to list products with none repeatitve buyers, all queries list data and repeat buyer's name at each row, I want result like below :

          Buyer Product
          Jack BMW
          Benz
          Volvo
          Tom Benz
          Toyota
          Ed BMW
          Volvo
          Citruen

          Please help...

          _ Offline
          _ Offline
          _Damian S_
          wrote on last edited by
          #4

          That becomes a formatting issue... how are you displaying the data to the users?

          I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! If you need a laugh, check out my Vodafone World of Difference application | If you like cars, check out the Booger Mobile blog | If you feel generous - make a donation to Camp Quality!!

          F 1 Reply Last reply
          0
          • _ _Damian S_

            That becomes a formatting issue... how are you displaying the data to the users?

            I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! If you need a laugh, check out my Vodafone World of Difference application | If you like cars, check out the Booger Mobile blog | If you feel generous - make a donation to Camp Quality!!

            F Offline
            F Offline
            freshonlineMax
            wrote on last edited by
            #5

            Hi It's good point, I want to show data in Crystal Report. Do you know any tutorial ?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups