On 1/18/18, Szyk Cech <[email protected]> wrote:
> Hi
>
> My concern is about a Primary Key in two columns (integer values) which
> I want type explicitly in my query (like in example "Not works"). My
> example only shows problem and it is not real case (however database is
> real).
>
> Not works:
>
> select * from card where (statNumber, question) in ((2211, 'psuć się'),
> (2542, 'kontynuować'), (1449, 'wymrzeć'))

Try it this way:

  SELECT * FROM card WHERE (statNumber,question) IN
    (VALUES(2211,'psuc sei'),(2542,'kontynuowac'), (1449,'wymrzec'));

I am open to enhancing the syntax here, but not right now because we
are trying to get the 3.22.0 release out - this would need to be
during the next cycle.  Also, I'll need to check to see what
PostgreSQL does first, and emulate them.

>
> Works:
>
> select * from card where (statNumber, question) in (select statNumber,
> question from card)
>
> Why?
>
> thanks and best regards
>
> Szyk Cech
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to