sql server - SQL Error Turkish_CI_AS and SQL_Latin1_General_CP1_CI_AS -


first, sorry long queries :)

i have query in sql server 2008 this. , working.

select c.hesap_no, b.teklif_no1 + '/' + b.teklif_no2 'teklif',     c.mus_k_isim,convert(varchar(10),b.isl_tar,103) 'tarih', sum(     isnull(cast(b.odenen_anapara float),0)+isnull(cast(b.faiz float),0)+     isnull(cast(b.bsmv float),0)+isnull(cast(b.gecikme_faiz float),0)+     isnull(cast(b.gecikme_bsmv float),0)) 'yatan',      (case when c.doviz_kod = 21 'eur' when c.doviz_kod = 2 'usd' when c.doviz_kod = 1 'tl' end) 'kur', d.t_sr_ack      takip a, yaz..mardata.bir_tahsil b,      yaz..mardata.s_teklif c,p_takip_sr d      b.teklif_no1 = c.teklif_no1     , b.teklif_no2 = c.teklif_no2     , a.t_hesap_no = c.hesap_no     , a.t_srm = d.t_sr_id     , a.t_statu = 2     , a.t_srm <> 6         group c.hesap_no, b.teklif_no1 + '/' + b.teklif_no2, c.mus_k_isim,b.isl_tar,c.doviz_kod, d.t_sr_ack 

but, when made little changing on query this;

select e.hesap, b.teklif_no1 + '/' collate turkish_ci_as + b.teklif_no2 'teklif',     e.musteri,convert(varchar(10),b.isl_tar,103) 'tarih', sum(     isnull(cast(b.odenen_anapara float),0)+isnull(cast(b.faiz float),0)+     isnull(cast(b.bsmv float),0)+isnull(cast(b.gecikme_faiz float),0)+     isnull(cast(b.gecikme_bsmv float),0)) 'yatan',      (case when c.doviz_kod = 21 'eur' when c.doviz_kod = 2 'usd' when c.doviz_kod = 1 'tl' end) 'kur',     e.avukat, convert(varchar(10),a.icra_tar,103) 'İcra tarİhİ', convert(varchar(10),a.haciz_tar,103) 'hacİz tarİhİ'     takip a, yaz..mardata.bir_tahsil b,      yaz..mardata.s_teklif c,p_takip_sr d, avukat e     b.teklif_no1 = c.teklif_no1     , b.teklif_no2 = c.teklif_no2     , a.t_hesap_no = c.hesap_no     , c.hesap_no = b.hesap_no     , b.hesap_no = e.hesap     , a.t_srm = d.t_sr_id     , a.t_statu = 2     , a.t_srm <> 6 group c.hesap_no, b.teklif_no1 + '/' + b.teklif_no2,b.isl_tar,c.doviz_kod, e.hesap, e.musteri, e.avukat, a.icra_tar, a.haciz_tar 

i getting error this

msg 468, level 16, state 9, line 16 cannot resolve collation conflict between "turkish_ci_as" , "sql_latin1_general_cp1_ci_as" in equal operation. 

anybody have idea error?

regards, soner

i think need replicate collate clause in group expression also:

select e.hesap, b.teklif_no1 + '/' collate turkish_ci_as + b.teklif_no2 'teklif',     e.musteri,convert(varchar(10),b.isl_tar,103) 'tarih', sum(     isnull(cast(b.odenen_anapara float),0)+isnull(cast(b.faiz float),0)+     isnull(cast(b.bsmv float),0)+isnull(cast(b.gecikme_faiz float),0)+     isnull(cast(b.gecikme_bsmv float),0)) 'yatan',      (case when c.doviz_kod = 21 'eur' when c.doviz_kod = 2 'usd' when c.doviz_kod = 1 'tl' end) 'kur',     e.avukat, convert(varchar(10),a.icra_tar,103) 'İcra tarİhİ', convert(varchar(10),a.haciz_tar,103) 'hacİz tarİhİ'     takip a, yaz..mardata.bir_tahsil b,      yaz..mardata.s_teklif c,p_takip_sr d, avukat e     b.teklif_no1 = c.teklif_no1     , b.teklif_no2 = c.teklif_no2     , a.t_hesap_no = c.hesap_no     , c.hesap_no = b.hesap_no     , b.hesap_no = e.hesap     , a.t_srm = d.t_sr_id     , a.t_statu = 2     , a.t_srm <> 6 group c.hesap_no, b.teklif_no1 + '/' collate turkish_ci_as + b.teklif_no2,b.isl_tar,c.doviz_kod, e.hesap, e.musteri, e.avukat, a.icra_tar, a.haciz_tar 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -