[firebird-support] Re: Optimizer request

2016-09-09 Thread 'Jeremy Poppleton' jeremy.popple...@csy.co.uk [firebird-support]
In is slow. Better to optimize the query like this: Select o.* >From orders o Inner join ( Select p.Partid From Partners p Where p.country

[firebird-support] Re: Block size exceeds implementation restriction exception for varchar(31000)

2016-09-08 Thread 'Jeremy Poppleton' jeremy.popple...@csy.co.uk [firebird-support]
Firebird has limitation on both IN clauses and parameter lists for stored procedures. Going down the route of trying to get around this can then cause errors with the command text limit. It is always best to redesign your stored procedure or query to join on a table that has the particular par

Re: [firebird-support] Substring and negative numbers

2016-09-06 Thread 'Jeremy Poppleton' jeremy.popple...@csy.co.uk [firebird-support]
Absolutely ! It seems that the mandatory postcode field has all kinds of non-postcode stuff in it ! For anyone else with this issue the original error was: Invalid length parameter -2 to SUBSTRING. Negative integers are not allowed. Changing the query to SELECT DISTINCT left(c.addr

[firebird-support] Substring and negative numbers

2016-09-05 Thread 'Jeremy Poppleton' jeremy.popple...@csy.co.uk [firebird-support]
This simple query: SELECT left(c.addr_5, CHAR_LENGTH(c.addr_5)-3) as trimmed FROM vecusts c Produces this error Pressing OK I then get correct values in the trimmed column. Can anyone assist or tell me what I am doing wrong? Many thanks [Non-text p