Bug 97338 - Criterion in Query fails in GUI when using DATEADD function, but runs in SQLView. Query can then only be edited, saved and run in Sqlview. Query runs normally, but cannot be edited in GUI.
Summary: Criterion in Query fails in GUI when using DATEADD function, but runs in SQL...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-23 20:52 UTC by Bob
Modified: 2016-10-10 11:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob 2016-01-23 20:52:29 UTC
Using >= DATEADD( 'dd', - 180, CURRENT_DATE ) in GUI gives a Syntax error when trying to add directly into GUI. Workaround is to add it in SQLVIEW AND TO SAVE IN SQLVIEW. Do not try run Query or SAVE in GUI as you will need to start all over, by deleting criterion , switching to SQLVIEW and re-editing. Query will run normally if saved and closed in SQLVIEW. 

GUI rules of syntax table a little fussy it seems.

Sample SQL Below. 

SELECT 
"ItemMaster"."ItemNo", 
"ItemSOHMonthly"."MonthEnd",
 "ItemSalesMonthly"."SalesQty",
 "ItemSOHMonthly"."SOHQty" 

FROM
 "ItemSOHMonthly" "ItemSOHMonthly",
 "ItemMaster" "ItemMaster",
 "ItemSalesMonthly" "ItemSalesMonthly"

WHERE
"ItemSOHMonthly"."ItemNo" = "ItemMaster"."ItemNo" 

AND
 "ItemSalesMonthly"."ItemNo" = "ItemMaster"."ItemNo"

AND 
"ItemSalesMonthly"."MonthEnd" = "ItemSOHMonthly"."MonthEnd" 

AND 
"ItemMaster"."ItemNo" = :ItemNo

AND
"ItemSOHMonthly"."MonthEnd" >= DATEADD( 'dd', - 180, CURRENT_DATE )
Comment 1 Robert Großkopf 2016-02-07 19:20:18 UTC
There is no function DATEADD in the internal HSQLDB. So please write down more about your special configuration:
- System you use.
- LO-Version you use.
- Database you use.
- Connection to the database (JDBC, ODBC, direct)
Comment 2 Xisco Faulí 2016-09-11 21:43:56 UTC Comment hidden (obsolete)
Comment 3 Xisco Faulí 2016-10-10 11:13:07 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20161010