The conversion of the varchar value overflowed an int column in sql server 2012 -
i'm getting error query data... error message is: msg 248, level 16, state 1, line 1: conversion of varchar value overflowed int column... cant resolve problem, if 1 can me, in advance, here sql:
this happens when inserted 3 new joins in query, made them bold, otherwise works perfectly...
select distinct acr_art_id, des_texts.tex_text criteria_des_text, coalesce(des_texts2.tex_text, acr_value) criteria_value_text, (des_texts.tex_text + ': ' + coalesce(des_texts2.tex_text, acr_value)) cel_opis inventory.dbo.article_criteria left join inventory.dbo.designations designations2 on designations2.des_id = acr_kv_des_id left join inventory.dbo.des_texts des_texts2 on des_texts2.tex_id = designations2.des_tex_id left join inventory.dbo.criteria on cri_id = acr_cri_id left join inventory.dbo.designations on designations.des_id = cri_des_id left join inventory.dbo.des_texts on des_texts.tex_id = designations.des_tex_id inner join inventory.dbo.art_lookup al on article_criteria.acr_art_id = al.arl_search_number , al.arl_kind in (1,3) inner join inventory.dbo.articles on al.arl_art_id = a.art_id , (a.art_sup_id=21 or a.art_sup_id=11091) inner join inventory.dbo.suppliers on suppliers.sup_id = art_sup_id** (designations.des_lng_id null or designations.des_lng_id = 25) , (designations2.des_lng_id null or designations2.des_lng_id = 25);
as commented @t i
the varchar col implicitly converted int , overflowing (i.e. >larger 2,147,483,647). resolve try casting columns bigint
you can cast column value data type
select cast( max(columnname) bigint)+1 atable ;
but if varchar fail, error better change db schema. use approach if sure numeric string present.
Comments
Post a Comment