Page 1 of 1

Syntax Error with postgresql

Posted: Wed Apr 23, 2014 9:04 pm
by JustBob
trying out Hoteldruid 2.1
on Debian wheezy with Postgres 9.1

When trying to make a reservation I get:
ERROR in: select * from regole2014 where (tariffa_commissioni != '' and tariffa_commissioni is not NULL) or (tariffa_chiusa != '' and tariffa_chiusa is not NULL) order by iddatainizio

ERROR in: select nomecostoagg from ntariffe2014 where idntariffe = 1

ERROR in: select * from ntariffe2014 where idntariffe > 10 and nomecostoagg != '' order by tipo_ca, idntariffe

ERROR in: select idperiodi from periodi2014 where datainizio = '2014-04-24'

ERROR in: select idperiodi from periodi2014 where datafine = '2014-05-01'
The dates are wrong.

postgres log states:

2014-04-23 21:57:57 CEST FEHLER: ungültige Eingabesyntax für ganze Zahl: »« bei Zeichen 56
2014-04-23 21:57:57 CEST ANWEISUNG: select * from regole2014 where (tariffa_commissioni != '' and tariffa_commissioni is not NULL) or (tariffa_chiusa != '' and tariffa_chiusa is not NULL) order by iddatainizio
2014-04-23 21:57:57 CEST FEHLER: aktuelle Transaktion wurde abgebrochen, Befehle werden bis zum Ende der Transaktion ignoriert

i.e. invalid input syntax for interger (offending syntax is tariffa_commissioni != ''<--- )

It makes the whole software unusable. Please fix asap

Edit:
removing "tariffa_commissioni != '' and " and "tariffa_chiusa != '' and " seems to fix it but dont know if this breaks something...

Re: Syntax Error with postgresql

Posted: Sat Apr 26, 2014 6:22 pm
by marco
Yes you can safely remove

Code: Select all

tariffa_commissioni != '' and
to solve the problem.

Regards,
Marco

Re: Syntax Error with postgresql

Posted: Wed Apr 30, 2014 3:03 pm
by JustBob
Hi
I found that

Code: Select all

tariffa_commissioni >= '0'
will do the trick too