PL/SQL Select 1 & Not Exists

 CREATE OR REPLACE VIEW "SCHEMA_NAME"."VEW_TEST_VIEW"
AS
  SELECT hayvankabul.id,
    hayvankabul.MEZBAHA_ID,
    hayvankabul.SAGLIK_RAPOR_NO,
    kentli.adi_soyadi yetistiren_adi_soyadi
  FROM mzb_hayvan_kabul_bilgileri hayvankabul,
    vew_ort_kentli kentli
  WHERE hayvankabul.id IN
    (SELECT kabul.id
    FROM mzb_hayvan_kabul_bilgileri kabul,
      mzb_hayvan_bilgileri hayvan
    WHERE kabul.id = hayvan.hayvan_kabul_id
    AND NOT EXISTS
      (SELECT 1
      FROM mzb_ante_mortem_hay_bilgileri antehayvan
      WHERE antehayvan.hayvan_id=hayvan.id
      )
    )
  AND hayvankabul.YETISTIRICI_KENTLI_ID=kentli.ID
  ORDER BY hayvankabul.id DESC;

Comments

Popular posts from this blog

Solution for the fault: "System.Diagnostics.Process.Start is not working on IIS, but working on ASP.NET Development Server"

Solution for "Can not obtain Oracle client information from registry"