https://bugs.freedesktop.org/show_bug.cgi?id=61895

          Priority: medium
            Bug ID: 61895
          Assignee: [email protected]
           Summary: : Concat accept only 2 arguments
          Severity: normal
    Classification: Unclassified
                OS: Mac OS X (All)
          Reporter: [email protected]
          Hardware: Other
        Whiteboard: BSA
            Status: UNCONFIRMED
           Version: 4.0.0.3 release
         Component: Database
           Product: LibreOffice

Problem description: 
I wanna buid a query where I insert a character string of a text field and the
query gives to me all the records with that character string that field.
If I do it with only a concat with 3 arguments, Base gives to me the next error

"Stato SQL: S1000
Codice di errore: 40

S1000 Errore generale java.lang.ArrayIndexOutOfBoundsException: 2 in statement
[SELECT "Titolo" AS "Titolo", "Del", "ultima", "Volte visto" FROM "Video2"
WHERE "Titolo" LIKE CONCAT( '%', :input, '%' ) ORDER BY "Titolo" ASC, "ultima"
ASC, "Volte visto" ASC, "Video2"."Titolo"]"


Steps to reproduce:
1. Build a table where there is a text field called "Titolo" and other fields

2. Build the next query:
SELECT "Titolo" AS "Titolo", "Del", "ultima", "Volte visto" FROM "Video2" WHERE
"Titolo" LIKE CONCAT( '%', :input, '%' ) ORDER BY "Titolo" ASC, "ultima" ASC,
"Volte visto" ASC

3. since it gives the previous error, i built the next query:
SELECT "Titolo" AS "Titolo", "Del", "ultima", "Volte visto" FROM "Video2" WHERE
"Titolo" LIKE CONCAT( CONCAT( '%', :input ), '%' ) ORDER BY "Titolo" ASC,
"ultima" ASC, "Volte visto" ASC

4. it works, but unfortunately, this query is case sensitive.


Current behavior:
The quesry at the step 2 gives the former error.

Expected behavior:
The query at the step 3 gives the right behavior (but is case sesitive)

Operating System: Mac OS X
Version: 4.0.0.3 release

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to