View Full Version : Issue in Select Statement

12-20-2011, 03:13 AM

i had encountered problem in my select statement..

here is my query:

SELECT s.EMP_NO, p.SSS, CONCAT(LNAME, ', ', FNAME, ' ', MI, '.') AS FULLNAME, s.SSSLoan, s.SSSAmor FROM hris.PERSONAL p, hris.employment em, payroll.sssloan s WHERE em.EMP_ID = p.EMP_ID AND em.EMP_NO = s.EMP_NO;

the output of this query is all data in SSSLoan was displayed..I want to display only is the employee that i choose.

Thank you

Old Pedant
12-20-2011, 08:24 AM
> I want to display only is the employee that i choose

Fine. Then put in some code to choose one.

NOTHING in that query is choosing only one employee.

Nothing is even looking like you are trying to choose only one employee.

I can't even guess how you want to specify the one employee you want to display.

Will you choose him/her by EMP_ID? By EMP_NO? By SSS? By FULLNAME?

Not a clue do you give us.