Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2010
    Posts
    713
    Thanks
    165
    Thanked 0 Times in 0 Posts

    Issue in Select Statement

    Hi...

    i had encountered problem in my select statement..

    here is my query:

    Code:
    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

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,965
    Thanks
    79
    Thanked 4,429 Times in 4,394 Posts
    > 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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •