Hi Jesse,

You probably need an additional join condition between vehicle_tbl and 
driver_tbl ie something of the form:

         ^{driver_tbl.}^."vehicle_id" = ^{vehicle_tbl.}^."id"    

Or whatever columns link the two tables ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
Twitter: http://twitter.com/OpenLink

On 25 Mar 2010, at 22:02, Jesse Sightler wrote:

> I'm currently trying to traverse a join table as follows:
> sparql
> 
> prefix testrdfview: <http://www.nowhere.com/testrdfview/#>
> create quad storage testrdfview:graph
>   from "testrdfview"."DBA"."vehicle" as vehicle_tbl
>   from "testrdfview"."DBA"."driver" as driver_tbl
>   from "testrdfview"."DBA"."vehicle_driver" as vehicle_driver_tbl
>   where (
>         ^{driver_tbl.}^."id" = ^{vehicle_driver_tbl.}^."driver_id" and
>         ^{vehicle_tbl.}^."id" = ^{vehicle_driver_tbl.}^."vehicle_id"
>       )
>   {
>     create testrdfview:qm-driver as graph 
> iri("http://^{URIQADefaultHost}^/testrdfview#";)
>     {
>         testrdfview:driver (driver_tbl."id") a testrdfview:driver ;
>         testrdfview:id driver_tbl.id as testrdfview:dba-driver-id ;
>         testrdfview:name driver_tbl.name as testrdfview:dba-driver-name ;
>         testrdfview:vehicle testrdfview:vehicle (vehicle_tbl."id") as 
> testrdfview:vehicle_of .
>     }
>   }
> ;
> 
> Unfortunately, this mapping seems to return all "vehicles" regardless of 
> whether the vehicle_driver table contains any data.  How can I create a 
> relationship like this across a join table?
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev_______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to