質問する

Sliderule's profile - activity

2014-11-07 20:43:38 +0200 質問に回答する Base: How can I fix this case when to be parsed by LO and not HSQL Directly?
SELECT 
     CASE 
     WHEN MOD("F3"."TOTAL", 2) = 1
        THEN "F3"."ID"
     ELSE NULL
     END AS "COL1"
  ,  CASE 
     WHEN MOD("F3"."TOTAL", 2) = 1
        THEN "F3"."FruitName"
     ELSE NULL
     END AS "COL2"
  ,  NULL  AS "COL3"
  ,  NULL  AS "COL4"
FROM "FRUITS_ROWNUM_VIEW" AS "F3"
ORDER BY "F3"."TOTAL" DESC 
LIMIT 1

By using LIMIT 1 at the bottom, this Query will work for you, whether using the LibreOffice Base Parser, OR, if the Query is passed to the database engine ( HSQL 1.8.1.10 ) directly.

Sliderule

2014-11-07 20:37:05 +0200 質問に回答する Base: How can I fix this case when to be parsed by LO and not HSQL Directly?
 SELECT 
      CASE 
      WHEN MOD("F3"."TOTAL", 2) = 1
         THEN "F3"."ID"
      ELSE NULL
      END AS "COL1"
   ,  CASE 
      WHEN MOD("F3"."TOTAL", 2) = 1
         THEN "F3"."FruitName"
      ELSE NULL
      END AS "COL2"
   ,  NULL  AS "COL3"
   ,  NULL  AS "COL4"
FROM "FRUITS_ROWNUM_VIEW" AS "F3"
ORDER BY "F3"."TOTAL" DESC 
LIMIT 1

By using the LIMIT 1 SQL command at the bottom, this should accomplish your task using LibreOffice Base.

Sliderule