Saolasın Hocam ,
if den vazgeçtim ,
SQL den hallettim , EXCEL sayesinde parçaal , birşeltir ile formülü otomatik ürettim....Daha kolay oldu...131 adet semt var...
if de de baya yol almıştım ama sıkıldım...
if örneği
Alan adı : SB
Türü : Sayı
VAL(_SQLINFO("TN.SEMT","LG_011_CLCARD CC , LG_XT1015_011 TN","CC.LOGICALREF=TN.PARLOGREF AND CC.CODE='"+[Cari Hesap Kodu]+"'"))
Alan Adı : S1
Türü : METİN
IF([SB]=1,"4.LEVENT",IF([SB]=2,"ACARKENT",IF([SB]=3,"ACARLAR",IF([SB]=4,"ACIBADEM",IF([SB]=5,"ALTINTEPE","")))))
Alan Adı : S2
Türü : METİN
IF([SB]=6,"ALTUNİZADE",IF([SB]=7,"ANADOLU HİSARI",IF([SB]=8,"ATA-2",IF([SB]=9,"ATAKENT",IF([SB]=10,"ATAKÖY","")))))
Alan Adı : S3
Türü : METİN
IF([SB]=11,"ATAŞEHİR",IF([SB]=12,"AVCILAR",IF([SB]=13,"AYŞEKADIN",IF([SB]=14,"BAĞCILAR",IF([SB]=15,"BAĞLARBAŞI","")))))
Alan Adı : S4
Türü : METİN
IF([SB]=16,"BAHÇEKÖY",IF([SB]=17,"BAHÇELİEVLER",IF([SB]=18,"BAHÇEŞEHİR",IF([SB]=19,"BAKIRKÖY",IF([SB]=20,"BALMUMCU","")))))
Alan Adı : S5
Türü : METİN
IF([SB]=21,"BALTALİMANI",IF([SB]=22,"BARAJ YOLU",IF([SB]=23,"BASINKÖY",IF([SB]=24,"BAŞAKŞEHİR",IF([SB]=25,"BATI ATAŞEHİR","")))))
if birleştirme
Alan Adı : Semt_ADI
Türü : METİN
[S1]+[S2]+[S3]+[S4]+[S5]
SQL Çözümüm :
CASE
WHEN LG_XT1015_011.SEMT = '1'THEN '4.LEVENT'
WHEN LG_XT1015_011.SEMT = '2'THEN 'ACARKENT'
WHEN LG_XT1015_011.SEMT = '3'THEN 'ACARLAR'
WHEN LG_XT1015_011.SEMT = '4'THEN 'ACIBADEM'
WHEN LG_XT1015_011.SEMT = '5'THEN 'ALTINTEPE'
WHEN LG_XT1015_011.SEMT = '6'THEN 'ALTUNİZADE'
WHEN LG_XT1015_011.SEMT = '7'THEN 'ANADOLU HİSARI'
WHEN LG_XT1015_011.SEMT = '8'THEN 'ATA-2'
WHEN LG_XT1015_011.SEMT = '9'THEN 'ATAKENT'
WHEN LG_XT1015_011.SEMT = '10'THEN 'ATAKÖY'
WHEN LG_XT1015_011.SEMT = '11'THEN 'ATAŞEHİR'
WHEN LG_XT1015_011.SEMT = '12'THEN 'AVCILAR'
WHEN LG_XT1015_011.SEMT = '13'THEN 'AYŞEKADIN'
WHEN LG_XT1015_011.SEMT = '14'THEN 'BAĞCILAR'
WHEN LG_XT1015_011.SEMT = '15'THEN 'BAĞLARBAŞI'
WHEN LG_XT1015_011.SEMT = '16'THEN 'BAHÇEKÖY'
WHEN LG_XT1015_011.SEMT = '17'THEN 'BAHÇELİEVLER'
WHEN LG_XT1015_011.SEMT = '18'THEN 'BAHÇEŞEHİR'
WHEN LG_XT1015_011.SEMT = '19'THEN 'BAKIRKÖY'
WHEN LG_XT1015_011.SEMT = '20'THEN 'BALMUMCU'
WHEN LG_XT1015_011.SEMT = '21'THEN 'BALTALİMANI'
WHEN LG_XT1015_011.SEMT = '22'THEN 'BARAJ YOLU'
WHEN LG_XT1015_011.SEMT = '23'THEN 'BASINKÖY'
WHEN LG_XT1015_011.SEMT = '24'THEN 'BAŞAKŞEHİR'
WHEN LG_XT1015_011.SEMT = '25'THEN 'BATI ATAŞEHİR'
WHEN LG_XT1015_011.SEMT = '26'THEN 'BAYRAMPAŞA'
WHEN LG_XT1015_011.SEMT = '27'THEN 'BEŞİKTAŞ'
WHEN LG_XT1015_011.SEMT = '28'THEN 'BEYKOZ'
WHEN LG_XT1015_011.SEMT = '29'THEN 'BEYLERBEYİ'
WHEN LG_XT1015_011.SEMT = '30'THEN 'BEYLİKDÜZÜ'
WHEN LG_XT1015_011.SEMT = '31'THEN 'BOSTANCI'
WHEN LG_XT1015_011.SEMT = '32'THEN 'BULGURLU'
WHEN LG_XT1015_011.SEMT = '33'THEN 'CADDEBOSTAN'
WHEN LG_XT1015_011.SEMT = '34'THEN 'CEVİZLİ'
WHEN LG_XT1015_011.SEMT = '35'THEN 'ÇAMLICA'
WHEN LG_XT1015_011.SEMT = '36'THEN 'ÇAPA'
WHEN LG_XT1015_011.SEMT = '37'THEN 'ÇEKMEKÖY'
WHEN LG_XT1015_011.SEMT = '38'THEN 'ÇENGELKÖY'
WHEN LG_XT1015_011.SEMT = '39'THEN 'ÇİFTEHAVUZLAR'
WHEN LG_XT1015_011.SEMT = '40'THEN 'ÇUBUKLU'
WHEN LG_XT1015_011.SEMT = '41'THEN 'DUDULLU'
WHEN LG_XT1015_011.SEMT = '42'THEN 'EDİRNEKAPI'
WHEN LG_XT1015_011.SEMT = '43'THEN 'ERENKÖY'
WHEN LG_XT1015_011.SEMT = '44'THEN 'ETHEMEFENDİ'
WHEN LG_XT1015_011.SEMT = '45'THEN 'ETİLER'
WHEN LG_XT1015_011.SEMT = '46'THEN 'EYÜP'
WHEN LG_XT1015_011.SEMT = '47'THEN 'FATİH'
WHEN LG_XT1015_011.SEMT = '48'THEN 'FENERBAHÇE'
WHEN LG_XT1015_011.SEMT = '49'THEN 'FENERYOLU'
WHEN LG_XT1015_011.SEMT = '50'THEN 'FINDIKZADE'
WHEN LG_XT1015_011.SEMT = '51'THEN 'FLORYA'
WHEN LG_XT1015_011.SEMT = '52'THEN 'GAYRETTEPE'
WHEN LG_XT1015_011.SEMT = '53'THEN 'GAZETECİLER SİT.'
WHEN LG_XT1015_011.SEMT = '54'THEN 'GAZİOSMANPAŞA'
WHEN LG_XT1015_011.SEMT = '55'THEN 'GEBZE'
WHEN LG_XT1015_011.SEMT = '56'THEN 'GÖKTÜRK'
WHEN LG_XT1015_011.SEMT = '57'THEN 'GÖZTEPE'
WHEN LG_XT1015_011.SEMT = '58'THEN 'GÖZTEPE SOYAK'
WHEN LG_XT1015_011.SEMT = '59'THEN 'GÜNGÖREN'
WHEN LG_XT1015_011.SEMT = '60'THEN 'HALKALI'
WHEN LG_XT1015_011.SEMT = '61'THEN 'HİSARÜSTÜ'
WHEN LG_XT1015_011.SEMT = '62'THEN 'İÇERENKÖY'
WHEN LG_XT1015_011.SEMT = '63'THEN 'İDEALTEPE'
WHEN LG_XT1015_011.SEMT = '64'THEN 'İSTİNYE'
WHEN LG_XT1015_011.SEMT = '65'THEN 'KADIKÖY'
WHEN LG_XT1015_011.SEMT = '66'THEN 'KALAMIŞ'
WHEN LG_XT1015_011.SEMT = '67'THEN 'KANDİLLİ'
WHEN LG_XT1015_011.SEMT = '68'THEN 'KARTAL'
WHEN LG_XT1015_011.SEMT = '69'THEN 'KAVACIK'
WHEN LG_XT1015_011.SEMT = '70'THEN 'KAYNARCA'
WHEN LG_XT1015_011.SEMT = '71'THEN 'KAZASKER'
WHEN LG_XT1015_011.SEMT = '72'THEN 'KEMERBURGAZ'
WHEN LG_XT1015_011.SEMT = '73'THEN 'KIZILTOPRAK'
WHEN LG_XT1015_011.SEMT = '74'THEN 'KOŞUYOLU'
WHEN LG_XT1015_011.SEMT = '75'THEN 'KOZYATAĞI'
WHEN LG_XT1015_011.SEMT = '76'THEN 'KURTKÖY'
WHEN LG_XT1015_011.SEMT = '77'THEN 'KURTULUŞ'
WHEN LG_XT1015_011.SEMT = '78'THEN 'KUYUBAŞI'
WHEN LG_XT1015_011.SEMT = '79'THEN 'KÜÇÜKBAKKALKÖY'
WHEN LG_XT1015_011.SEMT = '80'THEN 'KÜÇÜKÇEKMECE'
WHEN LG_XT1015_011.SEMT = '81'THEN 'KÜÇÜKYALI'
WHEN LG_XT1015_011.SEMT = '82'THEN 'LEVAZIM'
WHEN LG_XT1015_011.SEMT = '83'THEN 'LEVENT'
WHEN LG_XT1015_011.SEMT = '84'THEN 'LİBADİYE CAD.'
WHEN LG_XT1015_011.SEMT = '85'THEN 'MADENLER'
WHEN LG_XT1015_011.SEMT = '86'THEN 'MALTEPE'
WHEN LG_XT1015_011.SEMT = '87'THEN 'MASLAK'
WHEN LG_XT1015_011.SEMT = '88'THEN 'MECİDİYEKÖY'
WHEN LG_XT1015_011.SEMT = '89'THEN 'MERTER'
WHEN LG_XT1015_011.SEMT = '90'THEN 'MODA'
WHEN LG_XT1015_011.SEMT = '91'THEN 'NARCİTY'
WHEN LG_XT1015_011.SEMT = '92'THEN 'NATOYOLU'
WHEN LG_XT1015_011.SEMT = '93'THEN 'NİŞANTAŞI'
WHEN LG_XT1015_011.SEMT = '94'THEN 'OKMEYDANI'
WHEN LG_XT1015_011.SEMT = '95'THEN 'ORTAKÖY'
WHEN LG_XT1015_011.SEMT = '96'THEN 'OSMANBEY'
WHEN LG_XT1015_011.SEMT = '97'THEN 'PAŞABAHÇE'
WHEN LG_XT1015_011.SEMT = '98'THEN 'PENDİK'
WHEN LG_XT1015_011.SEMT = '99'THEN 'PENDİK'
WHEN LG_XT1015_011.SEMT = '100'THEN 'RAHMANLAR'
WHEN LG_XT1015_011.SEMT = '101'THEN 'RASATHANE'
WHEN LG_XT1015_011.SEMT = '102'THEN 'RUMELİHİSARI'
WHEN LG_XT1015_011.SEMT = '103'THEN 'SAHRAYICEDİT'
WHEN LG_XT1015_011.SEMT = '104'THEN 'SARIGAZİ'
WHEN LG_XT1015_011.SEMT = '105'THEN 'SARIYER'
WHEN LG_XT1015_011.SEMT = '106'THEN 'SELAMİÇEŞME'
WHEN LG_XT1015_011.SEMT = '107'THEN 'SOĞANLIK'
WHEN LG_XT1015_011.SEMT = '108'THEN 'SUADİYE'
WHEN LG_XT1015_011.SEMT = '109'THEN 'SULTANGAZİ'
WHEN LG_XT1015_011.SEMT = '110'THEN 'ŞAŞKINBAKKAL'
WHEN LG_XT1015_011.SEMT = '111'THEN 'ŞENESENEVLER'
WHEN LG_XT1015_011.SEMT = '112'THEN 'ŞİŞLİ'
WHEN LG_XT1015_011.SEMT = '113'THEN 'TAKSİM'
WHEN LG_XT1015_011.SEMT = '114'THEN 'TARABYA'
WHEN LG_XT1015_011.SEMT = '115'THEN 'TEŞVİKİYE'
WHEN LG_XT1015_011.SEMT = '116'THEN 'TOPKAPI'
WHEN LG_XT1015_011.SEMT = '117'THEN 'TUZLA'
WHEN LG_XT1015_011.SEMT = '118'THEN 'UĞURMUMCU'
WHEN LG_XT1015_011.SEMT = '119'THEN 'ULUS'
WHEN LG_XT1015_011.SEMT = '120'THEN 'ÜMRANİYE'
WHEN LG_XT1015_011.SEMT = '121'THEN 'ÜSKÜDAR'
WHEN LG_XT1015_011.SEMT = '122'THEN 'YAKACIK'
WHEN LG_XT1015_011.SEMT = '123'THEN 'YAVUZTÜRK'
WHEN LG_XT1015_011.SEMT = '124'THEN 'YENİBOSNA'
WHEN LG_XT1015_011.SEMT = '125'THEN 'YENİKÖY'
WHEN LG_XT1015_011.SEMT = '126'THEN 'YENİŞEHİR SOYAK'
WHEN LG_XT1015_011.SEMT = '127'THEN 'YEŞİLKÖY'
WHEN LG_XT1015_011.SEMT = '128'THEN 'YEŞİLYURT'
WHEN LG_XT1015_011.SEMT = '129'THEN 'ZEKERİYAKÖY'
WHEN LG_XT1015_011.SEMT = '130'THEN 'ZEYTİNBURNU'
WHEN LG_XT1015_011.SEMT = '131' THEN 'ZİVERBEY'
END SEMT,