on 9/29/02 7:33 PM, Luca Porfiri at liste (at) mail .DOT sting.it wrote:
> No. The right is exactly as I wrote above: > > SELECT * FROM DISTINCT tbl1, tbl2 WHERE > tbl1.a = tbl2.A > AND (tbl1.B = 'IT' AND tbl1.D = 20020929) > AND ( tbl1.E = 'illumination' OR ( tbl2.B >= 25244000 AND tbl2.B < > 27000000)) > > Above I described the sense using values. In words the customer could hold > ITALY and the date and good records are those in which we have: > > the right country: ITALY or tbl1.B > the right date: 20020928 or tbl1.D > > and then > > OR the word "illumination" in text > OR the code of tender in the range 24-28 or 25244000-27000000 (in real > values). > > Let me know if this is clear for you or we cannot go on.
I think right now only way -- 2 queries and then you need build their intersection using RAM set or tmp table.
Very bad that this is for WS. It is slow...
Best way I think -- collect only RecIDs. I.e build cursors as SEELCT RecID FROM ...
Then you can (it seems) in one call to V4WS obtain ALL RecIDs as list from first cursor and second. Then does WS can build intersection of lists to remove duplicated ?
Having such result set you can navigate record by record using
select ... WHERE RecID = value
I do not see other way for now.
***************** Oh, wait! May be using of:
INSERT INTO ....
Can give you good speed! You can again collect only RecIDs or even full records.
And you can remove duplicated from that TMP table using query SELECT DISTINCT against this tmp table.
-- Best regards, Ruslan Zasukhin [ I feel the need...the need for speed ] ------------------------------------------------------------- e-mail: ruslan@paradigmasoft.com web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list send a letter to valentina-on (at) lists .DOT macserve.net ------------------------------------------------------------- ©2002 Ruslan Zasukhin |