BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: panus_t ที่ พฤศจิกายน 05, 2013, 10:57:55 AM
-
ดูคำสั่ง MySQL ให้หน่อยครับ ต้องการวันที่ไม่ว่างออกมาครับ
select clinicmember_id,clinic,hn,clinic_member_status_id,dchdate,send_to_pcu
from clinicmember
where clinic_member_status_id="1" and (dchdate <> "" or dchdate is not null)
-
select clinicmember_id,clinic,hn,clinic_member_status_id,dchdate,send_to_pcu
from clinicmember
where clinic_member_status_id="1" and dchdate <> "" and dchdate is not null
-
select clinicmember_id,clinic,hn,clinic_member_status_id,dchdate,send_to_pcu
from clinicmember
where clinic_member_status_id="1" and dchdate <> "" and dchdate is not null
มีแต่วันที่ว่างออกมาครับ ???
-
select clinicmember_id,clinic,hn,clinic_member_status_id,dchdate,send_to_pcu
from clinicmember
where clinic_member_status_id="1" and dchdate <> "" and dchdate is not null
ผม run คำสั่งนี้ก็ได้ข้อมูลมาถูกต้องนะครับ ไม่มีวันที่ว่าง ๆ แสดงมา
ลองตรวจสอบข้อมูลใน record นั้น ๆ อีกทีครับ
หรือลองคำสั่งนี้
select clinicmember_id,clinic,hn,clinic_member_status_id,dchdate,send_to_pcu
from clinicmember
where clinic_member_status_id="1" and length(trim(dchdate ))> 0
-
งง งง งง งง มาก ???
เมื่อมีแต่วันที่ ที่ว่าง
-
คงต้องดู fieldtype ของ dchdate แล้วหล่ะครับ