0
SELECT top 1
case
when VR = -99999.99
then 0
else cast((VR*1.732) as decimal(38,3))
end
FROM pseb.dbo.datasource
where FeederID=5003
order by datetime desc
는 위의 쿼리는 잘 작동,하지만 난 VARCHAR 값을 반환 할 필요가 - 내가 그Select Case 문 오류가
SELECT top 1
case
when VR = -99999.99
then '--'
else cast((VR*1.732) as decimal(38,3))
end
FROM pseb.dbo.datasource
where FeederID=5003
order by datetime desc
같이 할 경우 대신 0
을 반환하는 '' 그것은 다음과 같은 오류를 반환 의미하는 것은 :
Msg 8114, Level 16, State 5, Line 1 Error converting data type varchar to numeric.
그것을
를 해결하기 위해 저를 도와주세요 0