Row value in predicate doesn't work

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Row value in predicate doesn't work

Lukas Eder
According to my understanding of the SQL standard, the following query
should work, but doesn't on SQLite 3.25.2:

SELECT 1
WHERE (1, 1) IN ((1, 1), (1, 2));

The error I'm getting (via xerial) is:
SQL Error [1]: [SQLITE_ERROR] SQL error or missing database (row value
misused)

A workaround is this:

SELECT 1
WHERE (1, 1) IN (SELECT 1, 1 UNION ALL SELECT 1, 2);

Thanks,
Lukas
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Row value in predicate doesn't work

Lukas Eder
Following up, this also doesn't seem to be implemented:

SELECT 1
WHERE (1, 1) IS NULL;

I think this should be added for completeness' sake of the row value
predicate functionality

On Wed, Oct 10, 2018 at 3:42 PM Lukas Eder <[hidden email]> wrote:

> According to my understanding of the SQL standard, the following query
> should work, but doesn't on SQLite 3.25.2:
>
> SELECT 1
> WHERE (1, 1) IN ((1, 1), (1, 2));
>
> The error I'm getting (via xerial) is:
> SQL Error [1]: [SQLITE_ERROR] SQL error or missing database (row value
> misused)
>
> A workaround is this:
>
> SELECT 1
> WHERE (1, 1) IN (SELECT 1, 1 UNION ALL SELECT 1, 2);
>
> Thanks,
> Lukas
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users