leeonsoft / txquery

Automatically exported from code.google.com/p/txquery
Other
0 stars 0 forks source link

Updated and improved Sources Of TXQuery [Posted HERE] #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi I have made a little improvements in TXQuery.

The change is regarding Issue 20.

When using a query like:

select distinct adr_id as id from amr where
                 (adr_id NOT IN (select adr_id from amr where mer_id = 5))

The default behaviour is like:

select distinct adr_id as id from amr where
                 (adr_id NOT IN ANY (select adr_id from amr where mer_id = 5))

So this causes each record of 'amr' to be included in the resultset.

Using a query with the 'ALL':
select distinct adr_id as id from amr where
                 (adr_id NOT IN ALL (select adr_id from amr where mer_id = 5))

will do the work as expected.

So I changed the behaviour to, by default use the 'ALL' instead of 'ANY' if 
those keywords are not specified when using the 'NOT IN' clause.

so:

select distinct adr_id as id from amr where
                 (adr_id NOT IN (select adr_id from amr where mer_id = 5))

will be treated the same as:

select distinct adr_id as id from amr where
                 (adr_id NOT IN ALL (select adr_id from amr where mer_id = 5))

this change only affects when using the 'NOT IN'

As always updated sources are uploaded here

Please give some feedback

Original issue reported on code.google.com by fdue...@gmail.com on 3 Nov 2011 at 4:25

Attachments:

GoogleCodeExporter commented 9 years ago
i got the error undeclared identifier _SINTEGER on line 276 of xqlex.pas when 
compiling under delphi 7

Original comment by lfeit...@gmail.com on 23 Nov 2011 at 2:08