2
"를 텍스트로 알 수없는에서 변환 기능을 찾지 못했습니다"나는 다음 PostgreSQL의 쿼리를 가지고 :PostgreSQL을 오류 :
내가이 쿼리를 실행하려고with A as
(
select '201405MASE04' as TestID, Count(*) TotQ, Count(distinct Case When SE1 = '' then NULL else SE1 end) TotSE,
case when Count(*)=0 then 7 else Count(distinct RC) end TotRC
from eivTestItems TI, eivTests T
where TI.Test_ID = T.Test_ID
and T.Test_Type_ID = 1
and T.Test_ID= '201405MASE04'
and TI.Omit <> 1
),
B as
(
select '201405MASE04' as TestID, Count(*) TotQ
from eivTestItems TI, eivTests T
where TI.Test_ID = T.Test_ID
and T.Test_Type_ID = 1
and T.Test_ID= '201405MASE04'
and TI.Omit = 1
),
C as
(
select '201405MASE04' as TestID, Count(*) TotQ
from eivTestItems TI, eivTests T
where TI.Test_ID = T.Test_ID
and T.Test_Type_ID = 1
and T.Test_ID= '201405MASE04'
and TI.Question_Type_ID='2'
)
Select A.TestID, A.TotQ + coalesce(B.TotQ,0) - coalesce(C.TotQ,0) as TotQ, A.TotSE, A.TotRC
From A
left outer Join B on A.TestID = B.TestID
left outer Join C on A.TestID = C.TestID
, 그것은 나에게 다음과 같은 오류를 던지고있다 :
ERROR: failed to find conversion function from unknown to text
********** Error **********
ERROR: failed to find conversion function from unknown to text
SQL state: XX000
여기서 어떻게 변환 오류가 발생하는지 어떻게 알 수 있습니까?
멋진 고마워요. – Abhishek