CREATE PROC spCariDINAMIKMaili_Omayan_Efatura_Carileri
AS

SELECT MUSKOD,MUSADI,MUSDURUM,A.email_1,A.email_2,A.email_3 FROM AMUSTERI M , AMusteri1 A WHERE A.CariNo=M.MUSNO AND  MUSNO IN (
select DISTINCT S.CariNo
--,M.MUSADI,UUID,LEN (UUID) UUID_UZUNLUK ,A.email_1,A.email_2,A.email_3 
from STOKHARDETBAG S, AMusteri1 A,AMUSTERI M
WHERE S.CariNo=A.CariNo AND  A.CariNo=M.MUSNO AND LEN (UUID)>10 AND A.email_1 NOT LIKE '%@%' AND MUSDURUM='A' )
ORDER BY MUSKOD 

