SQL question

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Jul 26 09:27:21 CDT 2005


On 7/26/05 12:45 AM, "Chris Sheffield" <cmsheffield at gmail.com> wrote:

Hi Chris,

> I hope you all don't mind me asking a basic SQL question, not
> necessarily directly related to Valentina.

Of course
 
> I have two tables linked in a many-to-many relationship via a third
> intersect table.  I'm trying to figure out how to retrieve the data I
> need from the two tables.  After creating the structure and running a
> query in MS Access, the SQL is something like:
> 
> 
> SELECT Roles.RoleDesc, Tasks.TaskDesc FROM (Roles INNER JOIN
> TaskRoles ON Roles.RecID = TaskRoles.RolePtr) INNER JOIN Tasks ON
> TaskRoles.TaskPtr = Tasks.RecID
> 
> 
> But this gives me a "602:  Table Not Fount" error in Valentina.

Looks you use Valentina 1.x

> I'm  sure it has something to do with the JOIN syntax, but I'm not really
> sure how to change that to make it work for Valentina.

1.x do not support such syntax.
Must be 

SELECT Roles.RoleDesc, Tasks.TaskDesc
FROM Roles, TaskRoles, Tasks
WHERE
    Roles.RecID = TaskRoles.RolePtr AND
    TaskRoles.TaskPtr = Tasks.RecID



> I'm hoping  it's not going to require two separate queries.  Can someone help?
> I'm not very good with joins.

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list