• 18-03-2020, 15:03:17
    #1
    Arkadaşlar sitemde iki tablo var satıcılar ve shift işlemi.


    SELECT * FROM satispersoneli sp left join shift s on s.Suid=sp.Sid where sp.Smagaza = 2 and s.Shafta = 12 (Bu kısımda hem haftası 12 olan ve null olanları almam lazım nasıl alırım ) and sp.Saktifmi = 1
  • 18-03-2020, 15:06:57
    #2
    And (s.Shafta = 12 or s.Shafta = NULL) and

    Diye çalışır
  • 18-03-2020, 15:07:34
    #3
    SELECT * FROM satispersoneli sp left join shift s on s.Suid=sp.Sid where sp.Smagaza = 2 and sp.Saktifmi = 1 WHERE s.Shafta = 12 AND s.Shafta = NULL Dener misiniz.
  • 18-03-2020, 15:11:19
    #4
    Yok Hocam olmadı.

    mixerdating adlı üyeden alıntı: mesajı görüntüle
    SELECT * FROM satispersoneli sp left join shift s on s.Suid=sp.Sid where sp.Smagaza = 2 and sp.Saktifmi = 1 WHERE s.Shafta = 12 AND s.Shafta = NULL Dener misiniz.
  • 18-03-2020, 15:12:03
    #5
    Adalente adlı üyeden alıntı: mesajı görüntüle
    Arkadaşlar sitemde iki tablo var satıcılar ve shift işlemi.


    SELECT * FROM satispersoneli sp left join shift s on s.Suid=sp.Sid where sp.Smagaza = 2 and s.Shafta = 12 (Bu kısımda hem haftası 12 olan ve null olanları almam lazım nasıl alırım ) and sp.Saktifmi = 1
    SELECT * FROM satispersoneli sp left join shift s on s.Suid=sp.Sid where sp.Smagaza = 2 and (s.Shafta = 12 OR s.Shafta is NULL) and sp.Saktifmi = 1
  • 18-03-2020, 15:14:23
    #6
    SELECT * FROM satispersoneli sp left join shift s on s.Suid=sp.Sid where sp.Smagaza = 2 and (s.Shafta = 12 and s.Shafta is null) and sp.Saktifmi = 1
  • 18-03-2020, 15:16:47
    #7
    Hocam bu sorgu boş döndü. ama parantez içindeki sorguyu or ile çivirmek lazımdı bunu or yapınca istediğim sonuca varıdm

    perkosan adlı üyeden alıntı: mesajı görüntüle
    SELECT * FROM satispersoneli sp left join shift s on s.Suid=sp.Sid where sp.Smagaza = 2 and (s.Shafta = 12 and s.Shafta is null) and sp.Saktifmi = 1
  • 18-03-2020, 15:20:23
    #8
    Evet haklısın hocam or olacaktı...