I have 3 tables and I can't see the query result properly.
Following are the tables I'm using.
Project
Product
Users
I need Name from project and Ar_Description from Product to be displayed for the user logged. But the result of the query is showing only one result.
I want it to be grouped by the groups assigned to the user.
It is getting the correct user and group but not all the projects in that group.
Below is the code I'm using:
userLab =
Select USERS.C_USER_LAB
Where user_name = USER
Order By user_name
usergroup =
Select USERS.GROUP_NAME
Where user_name = USER
Order By user_name
Receive = "F"
cleararray(UnitsArray1)
Query ="Select DISTINCT PROJECT.NAME, PRODUCT.AR_DESCRIPTION, Project.GROUP_NAME from Project INNER JOIN PRODUCT ON PROJECT.C_SAMPLE_TYPE = PRODUCT.C_PRODUCT_TYPE where PROJECT.C_RECEIVED = '" + Receive + "' and PROJECT.GROUP_NAME = '" + usergroup + "' and PROJECT.C_LAB = '" + userLab + "'"
Expected data:
Data Expected as different projects are there
Data received:
Same Project for different Description (All are not received or in project table)