The problem is that it will show 2 the same result but with different employee fname.
How to have something like this .
"Employee.employee_id has employee.fname "
It will show also lots of result if I will not use distinct.
Select distinct TRANSACTION.TRANSACTION_ID ,CUSTOMER.FNAME ,CUSTOMER.LNAME,PET.PNAME,Employee.Emp_ID,Employee.fname,TRANSACTION.DATESTART,TRANSACTION.DATEEND
from(TRANSACTION)
INNER JOIN CUSTOMER
ON TRANSACTION.CUSTOM_ID = CUSTOMER.CUSTOM_ID
inner JOIN EMPLOYEE
ON TRANSACTION.EMP_ID = EMPLOYEE.EMP_ID
INNER JOIN EMPLOYEE
ON TRANSACTION.EMP_ID = EMPLOYEE.EMP_ID
INNER JOIN PET
ON TRANSACTION.PET_ID = PET.PET_ID
INNER JOIN EMPLOYEE
ON TRANSACTION.EMP_ID = EMPLOYEE.EMP_ID
Where TRANSACTION.STATUS=1
order by TRANSACTION.TRANSACTION_ID
TRANSACTION TABLE COLUMNS
TRANSACTION_ID CAMOUNT COST CHANGE CUSTOM_ID EMP_ID PET_ID DATESTART DATEEND SERVICES STATUS ROOMCOST DATETODAY
EMPLOYEE TABLE COLUMNS
EMP_ID FNAME MNAME LNAME AGE ADDRESS BDAY EMPTYPE USER_ID
PET TABLE COLUMNS
PET_ID PNAME PCOLOR PBREED PGENDER PET_ID PNAME PCOLOR PBREED PGENDER
CUSTOMER TABLE COLUMNS
CUSTOM_ID FNAME MNAME LNAME ADDRESS CONTACT_NUM EMAIL EMP_ID PET_ID