Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 15 wrz 2008 · If you need to write just one condition, then iif() is sufficient, however if you want to write multiple iif() conditions within one statement then you will have to use `case' statement as demonstrated in above responses. Here is an example for your reference.

  2. 28 maj 2024 · We can use either a CASE statement or an IIF() function to implement IF-THEN logic in SQL. In this tutorial, we’ll explore how to implement IF-THEN logic in SQL across various dialects such as SQL Server, MySQL, and PostgreSQL.

  3. 17 sty 2012 · The code above results in the following error: ERROR: invalid input syntax for type boolean: "lastcontact is null". New section containing the result of Erwin's function. I have used this function: CREATE OR REPLACE FUNCTION foo (lastcontact timestamptz) RETURNS void AS $BODY$ DECLARE myrec record; mycond boolean; BEGIN FOR myrec IN SELECT * ...

  4. 5 lis 2014 · I have a simple select statement below: SELECT Code = Cast([Code] as int) FROM dbo.table I get an error: Conversion failed when converting the nvarchar value '?' to data type int. I want to write IFERROR or CASE statement that would would replace error with a number such as -9999

  5. 12 wrz 2022 · Using a Boolean Function in an Argument. The most common Boolean function found in a T-SQL IF statement is the EXISTS function. When combined with a query, this function returns true when the query returns at least one row. It returns false when the query returns no rows.

  6. 26 wrz 2023 · Step 1: Basic Syntax. The IF...THEN statement in SQL is often used in conjunction with the CASE expression. The basic syntax goes like this: SELECT . column1, column2, ... CASE WHEN condition1 THEN result1. WHEN condition2 THEN result2. ... ELSE else_result. END AS alias_name. FROM . your_table; column1, column2, etc.:

  7. 3 wrz 2024 · Imposes conditions on the execution of a Transact-SQL statement. The Transact-SQL statement that follows an IF keyword and its condition is executed if the condition is satisfied: the Boolean expression returns TRUE.

  1. Ludzie szukają również