locked
Help!@! RRS feed

  • Question

  • User475570419 posted

    Hello,

    I need the following code to uf PMLOCD = NON-EMPLOYEES - RETIRED, not to return a value.  Here is the SQL Statement:

    SELECT [PMEMNO], [PMLNME], [PMFNME], [WORKPH], [CARPH] + '  /   ' + [PMPHN] as ALT, [PMDIV] 
    FROM   [EmployeeInfo]
     WHERE (([PMEMNO] LIKE '%' + @PMEMNO + '%') or 
                   ([PMLNME] LIKE '%' + @PMLNME + '%') or 
                   ([PMFNME] LIKE '%' + @PMFNME + '%') or 
                   ([WORKPH] LIKE '%' + @WORKPH + '%') or 
                   ([PMPHN] LIKE '%' + @PMPHN + '%') or 
                   ([PMDIV] LIKE '%' + @PMDIV + '%') or 
                   ([CARPH] LIKE '%' + @CARPH + '%') )
     Order by PMLNME, PMFNME

    Thank you

    Friday, January 29, 2016 7:21 PM

Answers

  • User-219423983 posted

    Hi Nighthawk,

    I need the following code to uf PMLOCD = NON-EMPLOYEES - RETIRED

    Could you first clarify what “uf PMLOCD = NON-EMPLOYEES - RETIRED” means, so that we could know what you want and then better help you?

    I assume that you want to get the result of “EmployeeInfo” that are not meet with some conditions. If so, you could use “in” or “not in” to do it. For this, you could have a look at the following article.

    https://msdn.microsoft.com/en-us/library/ms177682.aspx

    Best Regards,

    Weibo Zhang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 1, 2016 8:28 AM

All replies

  • User-219423983 posted

    Hi Nighthawk,

    I need the following code to uf PMLOCD = NON-EMPLOYEES - RETIRED

    Could you first clarify what “uf PMLOCD = NON-EMPLOYEES - RETIRED” means, so that we could know what you want and then better help you?

    I assume that you want to get the result of “EmployeeInfo” that are not meet with some conditions. If so, you could use “in” or “not in” to do it. For this, you could have a look at the following article.

    https://msdn.microsoft.com/en-us/library/ms177682.aspx

    Best Regards,

    Weibo Zhang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 1, 2016 8:28 AM
  • User475570419 posted

    Weibo,

    Your suggestion actually worked. I was able to get it to work.

    Monday, February 1, 2016 7:33 PM