Skip to content
Advertisement

Query Multiplies The Result When Selecting For One Value

Hello, I want to show Product, Sub Materials,Alternatives, Orders and Dates. Product has 5 sub materials and 8 orders in different dates. The problem I am facing is that Sub Materials multiplies 8 times according to orders. How can I fetch data properly for one repeated value? Thank you for your support.
-Query is as follows

enter image description here

-STOCK00 Table holds the Product’s name

-STOCK40T Table holds the orders. When I search the orders for ‘2496802300’ it shows as below

enter image description here

-What I want should look like this

enter image description here

Advertisement

Answer

Looks like your missing a Group by clause

Try This:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement