線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:966
推到 Plurk!
推到 Facebook!

SQL 問題一問

答題得分者是:chih
chcdelphi
一般會員


發表:4
回覆:6
積分:2
註冊:2003-04-23

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-06-03 09:59:51 IP:211.21.xxx.xxx 未訂閱
請教各位大大: 下列程式為何會出現 update Fail 呢?? delete from TCSConnection where EquipmentID = :OLD_EquipmentID and ProgramItem = :OLD_ProgramItem and SAC_No = :OLD_SAC_No and RIC_No = :OLD_RIC_No and RIC_Ch = :OLD_RIC_Ch and RW_Control = :OLD_RW_Control and RW_RIC_No = :OLD_RW_RIC_No and RW_RIC_ch = :OLD_RW_RIC_ch and Ch1 = :OLD_Ch1 and Ch2 = :OLD_Ch2 and Ch3 = :OLD_Ch3 and Ch4 = :OLD_Ch4 and Ch5 = :OLD_Ch5 and Ch6 = :OLD_Ch6 and Ch7 = :OLD_Ch7 and Ch8 = :OLD_Ch8 and CreateDate = :OLD_CreateDate and EditDate = :OLD_EditDate
chih
版主


發表:48
回覆:1186
積分:639
註冊:2002-04-02

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-06-03 10:27:09 IP:211.74.xxx.xxx 未訂閱
where 後面只要保留key值欄位就可以了,非key值欄位不用下在條件內 TRY TRY SEE
jerryhung
初階會員


發表:6
回覆:46
積分:30
註冊:2002-12-11

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-06-03 15:32:42 IP:202.39.xxx.xxx 未訂閱
引言: 請教各位大大: 下列程式為何會出現 update Fail 呢?? delete from TCSConnection 改成 delete TCSConnection where EquipmentID = :OLD_EquipmentID and ProgramItem = :OLD_ProgramItem and SAC_No = :OLD_SAC_No and RIC_No = :OLD_RIC_No and RIC_Ch = :OLD_RIC_Ch and RW_Control = :OLD_RW_Control and RW_RIC_No = :OLD_RW_RIC_No and RW_RIC_ch = :OLD_RW_RIC_ch and Ch1 = :OLD_Ch1 and Ch2 = :OLD_Ch2 and Ch3 = :OLD_Ch3 and Ch4 = :OLD_Ch4 and Ch5 = :OLD_Ch5 and Ch6 = :OLD_Ch6 and Ch7 = :OLD_Ch7 and Ch8 = :OLD_Ch8 and CreateDate = :OLD_CreateDate and EditDate = :OLD_EditDate
其他應該就可以了....建議你真的不行 先到SQL裡面試試看,確定T-SQL沒問題再拿來Delphi改
chcdelphi
一般會員


發表:4
回覆:6
積分:2
註冊:2003-04-23

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-06-03 16:54:26 IP:211.21.xxx.xxx 未訂閱
引言: where 後面只要保留key值欄位就可以了,非key值欄位不用下在條件內 TRY TRY SEE 謝謝你.... ok
系統時間:2024-11-25 16:27:05
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!