Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 26 cze 2023 · The CASE statement in the WHERE clause can conditionally filter rows based on defined criteria. The syntax for the CASE statement in the WHERE clause is shown below. The CASE expression matches the condition and returns the value of the first THEN clause.

  2. 9 paź 2013 · I believe you can use a case statement in a where clause, here is how I do it: Select ProductID OrderNo, OrderType, OrderLineNo From Order_Detail Where ProductID in ( Select Case when (@Varibale1 != '') then (Select ProductID from Product P Where .......)

  3. 3 wrz 2024 · CASE can be used in any statement or clause that allows a valid expression. For example, you can use CASE in statements such as SELECT, UPDATE, DELETE and SET, and in clauses such as <select_list> , IN, WHERE, ORDER BY, and HAVING.

  4. In SQL Server, the CASE statement in the WHERE clause is a powerful tool that allows you to apply conditional logic to filter rows based on specified conditions. The CASE statement evaluates one or more conditions and returns a result based on the first condition that is true.

  5. SQL Server CASE expression evaluates a list of conditions and returns one of the multiple specified results. The CASE expression has two formats: simple CASE expression and searched CASE expression. Both of CASE expression formats support an optional ELSE statement.

  6. CASE can not only be used in SELECT statements, but at any other place where an expression can be written. This includes UPDATE, DELETE, SET, MERGE, a WHERE or HAVING clause and an ORDER BY clause. Let’s illustrate with some examples.

  7. 11 lut 2020 · Using the SQL Server CASE statement to filter the results based on subsets. The CASE statement can be used in the WHERE clause to apply different filters for different subsets of the data. The following query returns only the male users older than 30 years and the female users older than 20 years:

  1. Ludzie szukają również