ERROR: column "diagnosis_id" is of type integer but expression is of type boolean
LINE 2: ...region_char_code, procedure_id, hide, code_type, (diagnosis_...
^
HINT: You will need to rewrite or cast the expression.
- Code: Select all
INSERT INTO diagnosis_procedures (flag_mutially_exclusive, flag_not_appropriate, region_char_code, procedure_id, hide, code_type, diagnosis_id)
SELECT flag_mutially_exclusive, flag_not_appropriate, region_char_code, procedure_id, hide, code_type, (diagnosis_id = '14742')
FROM diagnosis_procedures
WHERE diagnosis_id = '13783'
Any help would be much appreciated. I am using postgresql for my database.
Thank you,
Bob