-1
如何在此查詢中連接?將單獨的字段連接到日期
SQL
SELECT
eventscheduling.eventID,
event.eventName,
event.description,
sponsorCLUB.Organization,
department.Dname,
eventscheduling.smonth,
eventscheduling.sdate,
eventscheduling.syear,
eventscheduling.tHour,
eventscheduling.tMinute,
eventscheduling.tAmPm,
eventscheduling.venue,
eventscheduling.representative
FROM eventscheduling, event, department, sponsorCLUB
WHERE event.eventID=eventscheduling.eventID and
sponsorCLUB.sponsorID=eventscheduling.sponsorID and
department.DeptID=sponsorCLUB.DeptID and
eventscheduling.eventID='"+txtsearch.getText()+"'";
代碼
String sql="select eventscheduling.eventID, event.eventName, event.description,
sponsorCLUB.Organization, department.Dname, eventscheduling.smonth, eventscheduling.sdate,
eventscheduling.syear, eventscheduling.tHour, eventscheduling.tMinute, eventscheduling.tAmPm,
eventscheduling.venue, eventscheduling.representative from eventscheduling, event, department,
sponsorCLUB where event.eventID=eventscheduling.eventID and
sponsorCLUB.sponsorID=eventscheduling.sponsorID and department.DeptID=sponsorCLUB.DeptID and
eventscheduling.eventID='"+txtsearch.getText()+"'";
我想smonth
,sdate
和syear
組合成一個日期。
你如何看待結果以及你的數據庫是什麼? – pn8830 2013-03-11 15:22:55
設置此變量的編程語言是什麼? – 2013-03-11 15:32:08