NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

SELECT LISTEFINAL.* , (select OD.DURUM from OTOMATIK_TEKLIF_DATA OD
WHERE OD.TEKLIF_NO = LISTEFINAL.TEKLIF_NO ORDER BY OD.ID DESC LIMIT 1)
SONUC_DURUM FROM
( SELECT * FROM ( ( SELECT P.UYE_ID,P.MUSTERI_NO, M.AD, M.SOYAD , P.TEKLIF_NO, P.POLICE_NO, P.ID,M.VERGI_NO, M.TCKN , TT.PLAKA_IL,
TT.PLAKA_NO ,'' EK , P.NET_PRIM, P.URUN_KOD, P.BAS_TARIH, P.BIT_TARIH FROM POLICE P INNER JOIN TEKLIF_TRAFIK TT ON P.TEKLIF_NO = TT.TEKLIF_NO
AND P.VERSIYON_NO = TT.VERSIYON_NO AND P.URUN_KOD ='TRAFIK' AND LENGTH(P.POLICE_NO) > 3 INNER JOIN TEKLIF T ON TT.TEKLIF_NO = T.TEKLIF_NO AND TT.VERSIYON_NO = T.VERSIYON_NO
INNER JOIN MUSTERI M ON P.MUSTERI_NO = M.MUSTERI_NO WHERE P.BAS_TARIH >= '2013-11-01' AND P.BAS_TARIH < '2013-12-01' ) L1
LEFT JOIN (SELECT P.TEKLIF_NO R_TEKLIF_NO,P.POLICE_NO R_POLICE_NO, P.ID R_ID, M.VERGI_NO R_VERGI_NO, M.TCKN R_TCKN, TT.PLAKA_IL R_PLAKA_IL,
TT.PLAKA_NO R_PLAKA_NO,'' R_EK , P.NET_PRIM R_NET_PRIM, P.URUN_KOD R_URUN_KOD, P.BAS_TARIH R_BAS_TARIH, P.BIT_TARIH R_BIT_TARIH
FROM POLICE P INNER JOIN TEKLIF_TRAFIK TT ON P.TEKLIF_NO = TT.TEKLIF_NO AND P.VERSIYON_NO = TT.VERSIYON_NO AND P.URUN_KOD ='TRAFIK'
AND LENGTH(P.POLICE_NO) > 3 INNER JOIN TEKLIF T ON TT.TEKLIF_NO = T.TEKLIF_NO AND TT.VERSIYON_NO = T.VERSIYON_NO INNER JOIN MUSTERI M
ON P.MUSTERI_NO = M.MUSTERI_NO WHERE P.BAS_TARIH >= '2014-10-01' AND P.BAS_TARIH < '2014-12-01' ) L2 ON (L1.TCKN = L2.R_TCKN OR L1.VERGI_NO = L2.R_VERGI_NO )
AND L1.PLAKA_IL = L2.R_PLAKA_IL AND L1.PLAKA_NO = L2.R_PLAKA_NO AND L2.R_ID > L1.ID ) UNION SELECT * FROM ( ( SELECT P.UYE_ID,P.MUSTERI_NO, M.AD, M.SOYAD ,
P.TEKLIF_NO, P.POLICE_NO, P.ID,M.VERGI_NO, M.TCKN , TT.PLAKA_IL, TT.PLAKA_NO ,'' EK , P.NET_PRIM, P.URUN_KOD, P.BAS_TARIH, P.BIT_TARIH FROM POLICE P
INNER JOIN TEKLIF_KASKO TT ON P.TEKLIF_NO = TT.TEKLIF_NO AND P.VERSIYON_NO = TT.VERSIYON_NO AND P.URUN_KOD ='KASKO' AND LENGTH(P.POLICE_NO) > 3
INNER JOIN TEKLIF T ON TT.TEKLIF_NO = T.TEKLIF_NO AND TT.VERSIYON_NO = T.VERSIYON_NO INNER JOIN MUSTERI M ON P.MUSTERI_NO = M.MUSTERI_NO WHERE
P.BAS_TARIH >= '2013-11-01' AND P.BAS_TARIH < '2013-12-01' ) L1 LEFT JOIN (SELECT P.TEKLIF_NO R_TEKLIF_NO,P.POLICE_NO R_POLICE_NO, P.ID R_ID,
M.VERGI_NO R_VERGI_NO, M.TCKN R_TCKN, TT.PLAKA_IL R_PLAKA_IL, TT.PLAKA_NO R_PLAKA_NO, '' R_EK , P.NET_PRIM R_NET_PRIM, P.URUN_KOD R_URUN_KOD,
P.BAS_TARIH R_BAS_TARIH, P.BIT_TARIH R_BIT_TARIH FROM POLICE P INNER JOIN TEKLIF_KASKO TT ON P.TEKLIF_NO = TT.TEKLIF_NO AND P.VERSIYON_NO = TT.VERSIYON_NO
AND P.URUN_KOD ='KASKO' AND LENGTH(P.POLICE_NO) > 3 INNER JOIN TEKLIF T ON TT.TEKLIF_NO = T.TEKLIF_NO AND TT.VERSIYON_NO = T.VERSIYON_NO
INNER JOIN MUSTERI M ON P.MUSTERI_NO = M.MUSTERI_NO WHERE P.BAS_TARIH >= '2014-10-01' AND P.BAS_TARIH < '2014-12-01' ) L2 ON
(L1.TCKN = L2.R_TCKN OR L1.VERGI_NO = L2.R_VERGI_NO )AND L1.PLAKA_IL = L2.R_PLAKA_IL AND L1.PLAKA_NO = L2.R_PLAKA_NO AND L2.R_ID > L1.ID )
UNION SELECT * FROM ( ( SELECT P.UYE_ID,P.MUSTERI_NO, M.AD, M.SOYAD , P.TEKLIF_NO, P.POLICE_NO, P.ID,M.VERGI_NO, M.TCKN , MA.IL PLAKA_IL,
MA.ILCE PLAKA_NO, MA.BELDE EK, P.NET_PRIM, P.URUN_KOD, P.BAS_TARIH, P.BIT_TARIH FROM POLICE P INNER JOIN TEKLIF_KONUT TT
ON P.TEKLIF_NO = TT.TEKLIF_NO AND P.VERSIYON_NO = TT.VERSIYON_NO AND P.URUN_KOD ='KONUT' AND LENGTH(P.POLICE_NO) > 3
INNER JOIN TEKLIF T ON TT.TEKLIF_NO = T.TEKLIF_NO AND TT.VERSIYON_NO = T.VERSIYON_NO INNER JOIN MUSTERI M ON P.MUSTERI_NO = M.MUSTERI_NO
LEFT JOIN MUSTERI_ADRES MA ON TT.KONUT_ADRES_ID = MA.ID WHERE P.BAS_TARIH >= '2013-11-01' AND P.BAS_TARIH < '2013-12-01' ) L1 LEFT JOIN
(SELECT P.TEKLIF_NO R_TEKLIF_NO,P.POLICE_NO R_POLICE_NO, P.ID R_ID, M.VERGI_NO R_VERGI_NO, M.TCKN R_TCKN, MA.IL R_PLAKA_IL, MA.ILCE R_PLAKA_NO,
MA.BELDE R_EK, P.NET_PRIM R_NET_PRIM, P.URUN_KOD R_URUN_KOD, P.BAS_TARIH R_BAS_TARIH, P.BIT_TARIH R_BIT_TARIH FROM POLICE P INNER JOIN TEKLIF_KONUT TT
ON P.TEKLIF_NO = TT.TEKLIF_NO AND P.VERSIYON_NO = TT.VERSIYON_NO AND P.URUN_KOD ='KONUT' AND LENGTH(P.POLICE_NO) > 3 INNER JOIN TEKLIF T ON TT.TEKLIF_NO = T.TEKLIF_NO
AND TT.VERSIYON_NO = T.VERSIYON_NO INNER JOIN MUSTERI M ON P.MUSTERI_NO = M.MUSTERI_NO LEFT JOIN MUSTERI_ADRES MA ON TT.KONUT_ADRES_ID = MA.ID WHERE P.BAS_TARIH >= '2014-10-01'
AND P.BAS_TARIH < '2014-12-01' ) L2 ON (L1.TCKN = L2.R_TCKN OR L1.VERGI_NO = L2.R_VERGI_NO )AND L1.PLAKA_IL = L2.R_PLAKA_IL
AND L1.PLAKA_NO = L2.R_PLAKA_NO AND L2.R_EK = L1.EK AND L2.R_ID > L1.ID ) ) LISTEFINAL ORDER BY BAS_TARIH
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.