我要從數據庫裏取數據,有著麽一段code:
...
where
condition1 and
condition2 and
a.variable1 = 'ABC' and
condition4 and
condition5;
quit;
但是總說有錯,說在用where的時候,應該在‘,’ 和 ‘and' 之間有個 “)”之類的東西。可我的code裏根本沒有逗號 ’,'
請講講這是怎麽回事, 萬分感謝。
請教SQL大蝦們一個比較不太難的問題:
所有跟帖:
•
有時候係統提示doesnt make sense, 你吧你的code和係統提示原汁原味的貼上來
-撅著挺好-
♂
(0 bytes)
()
07/29/2009 postreply
20:41:44
•
那得等明天了,太晚了。
-小謀-
♀
(0 bytes)
()
07/29/2009 postreply
20:58:37
•
回複:請教SQL大蝦們一個比較不太難的問題:
-susan_6_5-
♀
(33 bytes)
()
07/29/2009 postreply
21:14:22
•
我覺得是那個a.var1='ABC' and ...出問題了,我也試了另一個寫法:
-小謀-
♀
(54 bytes)
()
07/29/2009 postreply
21:25:32
•
碰到這種情況就用排除法,從第一個condition開始
-撅著挺好-
♂
(48 bytes)
()
07/29/2009 postreply
21:55:29
•
對,排除法對付這個case很正。一個個加上去or 一個個去掉。
-戲雨飛鷹-
♀
(0 bytes)
()
07/30/2009 postreply
07:41:58
•
google error code and message
-goyo-
♂
(43 bytes)
()
07/30/2009 postreply
08:20:19
•
check also the FROM and SELECT
-goyo-
♂
(34 bytes)
()
07/30/2009 postreply
08:22:51
•
我今天上班找到那個多出來的逗號了.
-小謀-
♀
(0 bytes)
()
07/30/2009 postreply
20:47:25