Pantip.com Pantip-TechExchange | Pantip-Cafe | PantipMarket.com | Chat | PanTown.com | BlogGang.com| Torakhong.org| GameRoom
 




รบกวนดู sql query ให้ด้วยคะ

คือว่า Code sql นะคะ

Sql = "SELECT DailyRpt.*, Result_Meeting.Result_Meeting_Name FROM DailyRpt LEFT JOIN Result_Meeting "
Sql = Sql & "ON DailyRpt.Result_Meeting_ID = Result_Meeting.Result_Meeting_ID "
Sql = Sql & " Where ((DailyRpt.DailyRpt_Date between '" & Date1 & "' and '" & Date2 & "')"
If cboEmployee <> "·Ñé§ËÁ´" Then
Sql = Sql & " and DailyRpt.Employee_ID = '" & tmpEmployee & "' )"
End If


พอเกด debug ดูนะคะ มันออกมาเป็นแบบนี้คะ

"SELECT DailyRpt.*, Result_Meeting.Result_Meeting_Name FROM DailyRpt LEFT JOIN Result_Meeting ON DailyRpt.Result_Meeting_ID = Result_Meeting.Result_Meeting_ID  Where ((DailyRpt.DailyRpt_Date between '01-May-08' and '28-May-08') and DailyRpt.Employee_Im"

มันออกมาไม่ครบคะ ตรง

and DailyRpt.Employee_IM ความจริงมันต้องควรเป็น DailyRpt.Employee_ID = 'S0001'

 ไม่ทราบว่าควรต้องแก้ไขอย่างไรบ้างคะ ขอบคุณล่วงหน้าคะ



จากคุณ : xsonia -[ 28 พ.ค. 51 - 17:11:03 ]




ข้อความหรือรูปภาพที่ปรากฏในกระทู้ที่ท่านเห็นอยู่นี้ เกิดจากการตั้งกระทู้และถูกส่งขึ้นกระดานข่าวโดยอัตโนมัติจากบุคคลทั่วไป ซึ่ง PANTIP.COM มิได้มีส่วนร่วมรู้เห็น ตรวจสอบ หรือพิสูจน์ข้อเท็จจริงใดๆ ทั้งสิ้น หากท่านพบเห็นข้อความ หรือรูปภาพในกระทู้ที่ไม่เหมาะสม กรุณาแจ้งทีมงานทราบ เพื่อดำเนินการต่อไป
Considering the real-time nature of this webboard, it is impossible for us to review all messages/post. Please remember that we do not actively monitor the contents of and are not responsible for any messages posted. Anyone who feels that a posted message is inappropriate, Please encouraged to contact us immediately by email at kratoo@pantip.com , and We will remove objectionable messages within a reasonable time frame.



Pantip-Cafe | Pantip-TechExchange | PantipMarket.com | PanTown.com | BlogGang.com