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

Re: [firebird-support] Substring and negative numbers

2016-09-05 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
Hello Jeremy, Tuesday, September 6, 2016, 3:55:52 AM, you wrote: > This simple query: > SELECT left(c.addr_5, CHAR_LENGTH(c.addr_5)-3) as trimmed > FROM vecusts c > > Produces this error The list can't take attachments or embeds so you need to copy the error message in text. > > Pressing OK I t

[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