Strange error regarding data type

Database

Strange error regarding data type

All,

When I use this query select CASE WHEN TOTAL_PASS = 1 THEN 1 ELSE  0 END as COMPLIANCE....It seems to work, however when I use this CASE WHEN TOTAL_PASS = 1 THEN 'Y' ELSE  'N' END as COMPLIANCE... I get this error  "Output Schema does not match data from SELECT statement". I am guessing it does not like the string datatype. Does anyone have any ideas as to what could cause this?

Thanks,

Dan

1 REPLY
Enthusiast

Re: Strange error regarding data type

Hi

Kindly share the complete scenario.

If it is simple insert select then this should work fine.

--

Raj