#1 2014-11-21 12:32:58

eraldo
Member
From: Brasil
Registered: 2010-07-22
Posts: 69
Website

ESQLDBRemote exception "invalid ColTypes[0]=0"

ab,

As I run the sql:
'SELECT column FROM anytable;' executes successfully.

but..

'SELECT COALESCE (column, 0) as column FROM anytable;' does not run


Generates the error below


Erro

Offline

#2 2014-11-21 14:21:26

alpinistbg
Member
Registered: 2014-11-12
Posts: 124

Re: ESQLDBRemote exception "invalid ColTypes[0]=0"

Perhaps the affinity of the coalesce() is a little bit fuzzy wink

Offline

#3 2014-11-21 16:02:45

eraldo
Member
From: Brasil
Registered: 2010-07-22
Posts: 69
Website

Re: ESQLDBRemote exception "invalid ColTypes[0]=0"

Yes,
but anyway, with the use of COALESCE does not work.

Offline

#4 2014-11-21 19:16:42

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: ESQLDBRemote exception "invalid ColTypes[0]=0"

In fact, when there is a COALESCE, SQlite3 returns SQLITE_NULL as type for the column!
So we can not store it in our binary stream before the process...

IMHO SQLite3 is the only one to potentially change the column value from one row to another...

We would now handle per-row column type (SQLite3 only) e.g. select coalesce(column,0) from ..
See http://synopse.info/fossil/info/8cca20d7e0

Offline

Board footer

Powered by FluxBB