where句(!=)でcase文を使用する方法を理解しようとしていますが、ここでは何をしようとしているのか考えています:WHERE節の!=条件付きCASE文
SELECT *
FROM Table1 JOIN Table2 JOIN Table3
WHERE
CASE @fruit
WHEN 'Apples' THEN (What would go here to return only data related to apples in Table1?)
WHEN 'Citrus' THEN (What would go here to return data related to either oranges or lemons in Table2?)
WHEN 'Other' THEN (return all data not related to apples, oranges, or lemons from all 3 tables) (!=)
END
私はwhere句でcase文のいくつかの例を見ましたが、!= conditionを持つものではありません。何か案は?
あなたはSQLデータベースを達成しようとしていますか?あなたのデータと予想される出力を投稿する場合に役立ちます – maSTAShuFu
SQL Server。 – user3088720
大丈夫...私が言うことができるのはgoodluckです – maSTAShuFu