About 50 results
Open links in new tab
  1. DECODE( ) function in SQL Server - Stack Overflow

    Oct 13, 2009 · 2 select dbo.decode(10>1 ,'yes' ,'no') Unfortunately, that does not get you around having the CASE clause in the SQL, since you would need it to convert the logical expression to a bit …

  2. Decode function inside a decode function in SQL - Stack Overflow

    Sep 11, 2019 · What does the sql statement below print with explanation please: SELECT DECODE (2, 2, DECODE(3, 7, 2, 4, 5, 6)) FROM DUAL I understand the decode function alone but ...

  3. sql - MySQL equivalent of DECODE function in Oracle - Stack Overflow

    Jan 16, 2011 · Another MySQL option that may look more like Oracle's DECODE is a combination of FIELD and ELT. In the code that follows, FIELD() returns the argument list position of the string that …

  4. DECODE Oracle SQL - Stack Overflow

    Oct 25, 2014 · I recently came across few decode queries. I found this decode function somewhat confusing. here are the queries: SELECT promo_id, DECODE(NVL(promo_cost,0),promo_cost, …

  5. sql - oracle: decode and subquery select result - Stack Overflow

    Jul 27, 2012 · I have a oracle query and part of it is calculating some value using DECODE. For example: SELECT ..., (SELECT DECODE((SELECT 23 FROM DUAL), 0, null, ...

  6. Comparing dates in Oracle using the decode function

    Sep 1, 2010 · That function will return date2 if date2 <= date1. Plugging in the values and translating to pseudo-code, you get if 0 - 0 = 0 then date2 else date1 where both dates are the same.

  7. sql - Decode function in oracle database - Stack Overflow

    Feb 20, 2012 · Decode function in oracle database Asked 13 years, 11 months ago Modified 6 years, 10 months ago Viewed 82k times

  8. sql - CASE vs. DECODE - Stack Overflow

    Jul 7, 2010 · 2 CASE is a statement and DECODE is a function We can use the CASE in the where clause and can not use the DECODE in the where clause. DECODE can check equality operators …

  9. sql - Decode equivalent in postgres - Stack Overflow

    Mar 7, 2013 · There is no equivalent to the Oracle's DECODE() Function In Postgres. Is there anyone who wrote decode as a Function?

  10. oracle database - SQL Decode Null Values - Stack Overflow

    Mar 15, 2012 · I agree with @sql_mommy that CASE would probably look better. But I disagree about using TechOnTheNet as your primary source of information. You are usually better off with the …