1

このクエリを実行できません

ORA-00933: SQL コマンドが正しく終了していません
00933. 00000 - "SQL コマンドが正しく終了していません"

select count(user_id) 
from t_user 
where user_id = 2699478, object_id = 1329 
  and user_id not in
      (SELECT owner_user_id FROM t_obj where actual_id = 17447);  
4

4 に答える 4

5

,次のように、2 つの条件の間のコンマをuser_id=2699478 ,object_id=1329適切な条件演算子に置き換え、括弧を使用して必要な方法で表現する必要があります。

SELECT COUNT(user_id) 
FROM t_user 
WHERE user_id = 2699478 
  AND object_id = 1329 
  AND user_id NOT IN
    (
        SELECT owner_user_id 
        FROM t_obj 
        WHERE actual_id = 17447
    ) 
于 2012-06-20T15:50:54.157 に答える
4

ANDコンマを次のように置き換えてみてください。

select count(user_id) from t_user where user_id=2699478 AND object_id=1329 and user_id not in
  (SELECT owner_user_id FROM t_obj where actual_id = 17447);
于 2012-06-20T15:50:38.760 に答える
3

andコンマを次のように置き換えます。

select count(user_id)
from t_user
where user_id=2699478
  and object_id=1329
  and user_id not in (SELECT owner_user_id FROM t_obj where actual_id = 17447);
于 2012-06-20T15:50:48.600 に答える
1

コンマを「AND」に置き換える必要があります。

SELECT count(user_id) FROM t_user WHERE user_id=2699478 AND object_id=1329 AND user_id NOT IN
      (SELECT owner_user_id FROM t_obj WHERE actual_id = 17447);  
于 2012-06-20T15:54:46.963 に答える