[SQL] Related table question

Eric Forget forgete at cafederic.com
Fri Jan 16 00:43:17 CST 2004


Hi Ruslan,

Let's restart from scratch, since more I looking at it more problems I found
and you won't follow me...

What I'm trying to implement is a find dialog where the user specify the
conditions. Look at the Rule editor of the Mac OS X Mail (in the preferences
dialog) to see what I'm doing. The user can choose whether the conditions
must all match or just one.

For almost all the conditions (except 2) everything is working fine. As an
example I dynamically create:

    SELECT DISTINCT Table1.CalcID, Table1.Label
    FROM Table1
    WHERE (Table1.LowerName LIKE '\Ap') AND (Table1.Modified > '2004-01-13')
    ORDER BY Table1.LowerName

Or

    SELECT DISTINCT Table1.CalcID, Table1.Label
    FROM Table1
    WHERE (Table1.LowerName LIKE '\Ap') OR (Table1.Modified > '2004-01-13')
    ORDER BY Table1.LowerName

Calc.ID is a method equal to RecID, as you suggested me earlier today. These
2 examples works fine.

However for the 2 cases where I have a related table, e.g. Keywords, things
are not working well:

1) I'm not able to simulate "has not" with Keyword.Name. "has" works fine.

2) I'm unable to add them to the Boolean operation for the WHERE clause.

The meaningful fields of table Keyword looks like this:

    Table1      ObjectPtr
    Name        String

There may be 0-N Keyword record for each Table1.

Do you have any ideas on how I should proceed?

Eric

___________________________________________________________________

 Eric Forget                       Cafederic
 ForgetE at cafederic.com             <http://www.cafederic.com/>

 Fingerprint <86D5 38F5 E1FD 5D9C 71C3  BAA3 797E 70A4 6210 C684>




More information about the Valentina mailing list