Return only one row

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tammy
    New Member
    • Jul 2006
    • 4

    #1

    Return only one row

    Hello,

    I am trying to return only one row for the same person with mutiple trans codes. For example:

    AND INDVBENCVG.TRAN S_CD LIKE '8%' and ( indvbencvg.indv bencvg_effdt = ( select max ( b.indvbencvg_ef fdt ) from indvbencvg b where b.indv_id = indvbencvg.indv _id and INDVBENCVG.EXPD T >SYSDATE ) )
    AND ( ( EMPLRDEF_T.NAME 1 LIKE 'N%' AND EMPCURRPOSN.BEN GRP_CD NOT IN ( '18', '43','44','45', '60','70','71', '61','99' ) ) or ( EMPLRDEF_T.NAME 1 LIKE 'R%' AND EMPCURRPOSN.BEN GRP_CD NOT IN ( '10','14','17', '25','41','42' ) ) )

    This returns mutiple values for one employee that are different. I do not care what row it returns to me I just want any "ONE" of them.

    Example:
    11111 8000 N
    11111 8060 N
    11111 8010 N
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    How about using the LIMIT 1 in your query. It will return only 1 row.

    Ronald :cool:

    Comment

    Working...