#1 2018-04-20 02:30:43

bigheart
Member
Registered: 2014-08-01
Posts: 53

How to set subquery for sqlite in mORMot

Dear sir,

I'd like to query from sqlite as below:

  SELECT * FROM tracks WHERE bytes = (SELECT max(bytes) FROM tracks);

How to above query using TSQLRecord.CreateAndFillPrepare.

Thanks in advance.

Offline

#2 2018-04-20 03:48:16

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: How to set subquery for sqlite in mORMot

Did you tried using 'bytes = (SELECT max(bytes) FROM tracks)'?


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#3 2018-04-20 06:39:26

bigheart
Member
Registered: 2014-08-01
Posts: 53

Re: How to set subquery for sqlite in mORMot

It works.

Thank you.

Offline

Board footer

Powered by FluxBB