▼ กำลังโหลดข้อมูล... ▼
แสดงความคิดเห็น
คุณสามารถแสดงความคิดเห็นกับกระทู้นี้ได้ด้วยการเข้าสู่ระบบ
กระทู้ที่คุณอาจสนใจ
อ่านกระทู้อื่นที่พูดคุยเกี่ยวกับ
การพัฒนาซอฟต์แวร์
วิศวกรรมคอมพิวเตอร์
การพัฒนา Web Application
PHP
SQL
postgresql แปลง พ.ศ. เป็น ค.ศ. มีบางRecord มีค่าว่าง แล้ว ERROR: invalid input syntax for integer: "585-"
ผมจะแก้ไข code อย่างไรครับ
---------------------------------------------------------------------------------------------
select
case when t_patient.patient_birthday = '' then '0'
else cast(substr(t_patient.patient_birthday,1,4) as INTEGER)-543
end
FROM
t_patient
where t_patient.patient_birthday!=''
----------------------------------------------------------------------------------------------
ผลการรัน
----------------------------------------------------------------------------------------------
[Err] ERROR: invalid input syntax for integer: "585-"
---------------------------------------------------------------------------------------------
ผมจะแก้ไขอย่างไรดีครับ