Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 8 gru 2016 · If I understand the question correctly, you want the equivalent of decode but in T-SQL. Select YourFieldAliasName = CASE PC_SL_LDGR_CODE WHEN '02' THEN 'DR' ELSE 'CR' END

  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. Here are few alternative blog posts.

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

    See the following example: 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 ...

  4. 3 mar 2011 · The default character encoding for a SQL Server database is iso_1, which is ISO 8859-1. Note that the character encoding depends on the data type of a column. You can get an idea of what character encodings are used for the columns in a database as well as the collations using this SQL:

  5. 20 lis 2017 · Just as an alternative, Azure SQL Database supports decoding base64 encoded values into varbinary which can then be converted into a varchar value. convert(varchar(max), BASE64_DECODE([BASE64_ENCODED_COLUMN_NAME]))

  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. 2 cze 2015 · DECLARE @T TABLE (id SMALLINT IDENTITY(1, 1), BitMask TINYINT); INSERT INTO @T (BitMask) VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9); SELECT t.id, t.BitMask, bm.BitNum, bm.Permission FROM @T t OUTER APPLY ( SELECT * FROM (VALUES (1, 'Can Y'), (2, 'Can Z') ) bm(BitNum, Permission) WHERE t.BitMask & POWER(2, bm.BitNum - 1) <> 0 ) bm