SQL Server Error When Converting Varchar to Integer Type

Asked

Viewed 443 times

1

FOLLOWS THE ERROR

Msg 245, Level 16, State 1, Line 2
Conversion failed when converting the varchar value '280-64460-2' to data type int.

SQL DONE

USE TOXICOLOGICO
SELECT NomeUnidadeColeta, NomeUnidadeColetaAlterar, Procedimento 
FROM dbo.Z_CADEIA_CUSTODIA_SHIFT 
WHERE Procedimento IN ('T01', 'T02', 'T03', 'T05', 'T07', 'T08', 'T12P', 'T03P')
AND NomeUnidadeColeta IN ('Marilia Toxicológico', 'Marilia Toxicológico CLT', 'Marilia Concurso Toxicológico CLT')
  • 1

    Could include table format Z_CADEIA_CUSTODIA_SHIFT?

  • @Hugoguedes: The error message reports an attempt to convert a string expression to numerical value. In the code you transcribed there is no visible conversion. // Z_CADEIA_CUSTODIA_SHIFT is table, display or what?

  • This error must be from another query, right? After all says that you are trying to convert

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.