全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:793
推到 Plurk!
推到 Facebook!

Don't know how to fix.............. keyboard input

尚未結案
tabobomber
一般會員


發表:8
回覆:9
積分:3
註冊:2005-04-07

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-04-10 15:51:35 IP:203.55.xxx.xxx 未訂閱
this is the code that I have: PROMPT ---------------------------------------------------------------------------; PROMPT Details of Patients entered from the keyboard. PROMPT Patient Table PROMPT -------------------------------------------------------------; SELECT * FROM Patient; PROMPT Enter the PatientID as number (For Example: 2005) ACCEPT PatientID char PROMPT 'PatientID: ' PROMPT Enter the Surname ACCEPT Surname char PROMPT 'Surname: ' PROMPT Enter the GivenNames: ACCEPT GivenNames char PROMPT 'GivenNames: ' PROMPT Enter the Address: ACCEPT Address char PROMPT 'Address: ' PROMPT Enter the DateOfBirth: ACCEPT DATE PROMPT 'Date of Birth:(DD/MON/YYYY): ' PROMPT -------------------------------------------------------------; SET VERIFY OFF SET FEEDBACK ON PROMPT -------------------------------------------------------------; INSERT INTO PATIENT values (&patientID, '&Surname', '&GivenNames', 'Address', '', TO_DATE('dateOfBirth', 'DD/MON/YYYY'),''); but can't store in the database and wanna know what code shoule I put in if dateof bith unknown. thx
tabobomber
一般會員


發表:8
回覆:9
積分:3
註冊:2005-04-07

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-04-11 12:30:28 IP:131.217.xxx.xxx 未訂閱
I have solved the problem, but what about if the date in unknown? PROMPT Enter the PatientID as number (For Example: 2005) ACCEPT PatientID char PROMPT 'PatientID: ' PROMPT Enter the Surname ACCEPT Surname char PROMPT 'Surname: ' PROMPT Enter the GivenNames: ACCEPT GivenNames char PROMPT 'GivenNames: ' PROMPT Enter the Address: ACCEPT Address char PROMPT 'Address: ' PROMPT Enter the DateOfBirth: PROMPT ACCEPT Date PROMPT 'Date of Birth:(DD/MON/YYYY): ' PROMPT -------------------------------------------------------------; SET VERIFY OFF SET FEEDBACK ON PROMPT -------------------------------------------------------------; INSERT INTO PATIENT values (&patientID, '&Surname', '&GivenNames', '&Address', '', TO_DATE('&DD,&MON,&YYYY', 'DD/MON/YYYY'),''); PROMPT Patient Table PROMPT -------------------------------------------------------------; SELECT * FROM Patient; PROMPT Enter Admission Record PROMPT -------------------------------------------------------------; INSERT INTO admission VALUES(&patientID,'03-MAR-05','03-APR-05',null,null,null); SELECT * FROM Admission; spool off
tabobomber
一般會員


發表:8
回覆:9
積分:3
註冊:2005-04-07

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-04-11 23:35:10 IP:203.55.xxx.xxx 未訂閱
YEAH,fix it!!!! hahaha HAPPY PROMPT ---------------------------------------------------------------------------; PROMPT Details of Patients entered from the keyboard. PROMPT Enter the PatientID as number (For Example: 2005) ACCEPT PatientID char PROMPT 'PatientID: ' PROMPT Enter the Surname ACCEPT Surname char PROMPT 'Surname: ' PROMPT Enter the GivenNames: ACCEPT GivenNames char PROMPT 'GivenNames: ' PROMPT Enter the Address: ACCEPT Address char PROMPT 'Address: ' PROMPT Enter the DateOfBirth: PROMPT ACCEPT Date PROMPT 'Date of Birth:(DD/MON/YYYY): ' PROMPT -------------------------------------------------------------; SET VERIFY OFF SET FEEDBACK ON PROMPT -------------------------------------------------------------; INSERT INTO PATIENT values (&patientID, '&Surname', '&GivenNames', '&Address', '', TO_DATE(&DDMONYYYY, 'DD/MON/YYYY'),''); PROMPT Patient Table PROMPT -------------------------------------------------------------; SELECT * FROM Patient; PROMPT Enter Admission Record PROMPT -------------------------------------------------------------; INSERT INTO admission VALUES(&patientID,'&admissionDate','&dischargeDate',null,null,null); SELECT * FROM Admission; spool off
系統時間:2024-06-26 22:12:59
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!