Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 8 gru 2016 · While a CASE based solution works for most cases, it probably doesn't take into account NULL values. Oracle's DECODE is NULL safe, meaning that. DECODE(a, b, c, d, e, f) Translates to this standard SQL expression (which can be used starting with SQL Server 2022):

  2. 23 kwi 2011 · In SQL Server the equivalent code is CASE statement. Here are the examples regarding how DECODE can be written in SQL Server. SELECT CASE WHEN Letters = 'First' THEN 1 WHEN Letters = 'Second' THEN 2 WHEN Letters = 'Third' THEN 3 ELSE 0 END AS LN FROM LettersTable

  3. You can use 'sign' with a decode. Sign will return -1 for any negative, 0 for 0, and 1 for any positive: select decode(sign(money_return), -1, abs(money_return), 1, money_return*10, money_return) from cash_t;

  4. www.sqltutorial.org › sql-comparison-functions › sql-decodeSQL DECODE - SQL Tutorial

    SELECT DECODE (3, 1, 'Equal 1,', 2, 'Equal 2', 'Not Equal 1 or 2'); Code language: SQL (Structured Query Language) (sql) This example works like the following IF-THEN-ELSEIF-ELSE statement: IF 3 = 1 THEN RETURN 'Equal 1'; ELSE IF 3 =2 THEN RETURN 'Equal 2'; ELSE RETURN 'Not Equal 1 or 2'; END IF ; Code language: SQL (Structured Query Language ...

  5. 20 lis 2017 · I have a varchar column in a table in SQL Server that holds a Base64-encoded text string, which I would like to decode into its plain text equivalent. Does SQL Server have any native functionality to handle this type of thing?

  6. DECODE allows you to compare a value to a set of possible values and return a corresponding result when a match is found. It is often used for data transformation, simplifying complex CASE statements, and providing concise value substitution based on specific conditions.

  7. Learn how to decode values based on specified conditions, replacing complex CASE statements with concise syntax. Explore practical examples showcasing the versatility of DECODE in SQL queries, enabling efficient data manipulation and enhanced query performance.

  1. Ludzie szukają również