Welcome to Sign in | Help

Re: CASE in WHERE

  •  07-03-2008, 11:22 AM

    Re: CASE in WHERE

    ssandu:
    Ma gandeam sa nu mai fie nevoie de inca un tabel

    SELECT *
    FROM tabel
    WHERE utilizator IN
      (
      SELECT Lista
      FROM
        (
        SELECT 'user1' AS Utilizator, 'user1' AS Lista
        UNION
        SELECT 'user1' AS Utilizator, 'user2' AS Lista
        UNION
        SELECT 'user3' AS Utilizator, 'user3' AS Lista
        UNION
        SELECT 'user3' AS Utilizator, 'user2' AS Lista
        ) AS Q
      WHERE Utilizator = USER_NAME())

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems