Link to home
Start Free TrialLog in
Avatar of ja-rek
ja-rek

asked on

Conversion failed when converting the varchar value

Dear Experts

select TKN_Dziennik from cdn.TKNag where TKN_Dziennik is not null union
select TrN_Dziennik from cdn.TraNag where TrN_Dziennik is not null union
select TrN_WsDziennik from cdn.TraNag where TrN_WsDziennik 

Open in new window


I got error in Sql Srv "Conversion failed when converting the varchar value 'ZK' to data type tinyint."
what should I do wrong?
do I need to use cast/convert in every line?

thanks
Jarek
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Since I don't see a CAST( as int) in here, then likely one or more of these objects is a view or table-valued function that has a CAST( as int) in it, and is failing there.
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ja-rek
ja-rek

ASKER

thanks for help!