<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi all,<br><br>I've got this snippet of SQL which I'm trying desperately to convert to DBIx::Class.<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  SELECT stuff <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  FROM Timetable ttb<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LEFT OUTER JOIN Person prs ON <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (addr.UNIQUE_ID = prs.UNIQUE_ID AND<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; (addr.availableFrom &lt;= prs.availableTo AND addr.availableTo &gt;= prs.publishedFrom <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; etc., etc<br><br><br><br>Basically there is a table between this Timetable &lt;-&gt; Person "relationship", which is where I am having problems in doing a Timetable-&gt;search( { conditions } );<br><br>Timetable:<br>availableTo<br>availableFrom<br>UNIQUE_ID<br><br>Owner:<br>UNIQUE_ID<br><br>Person:<br>availableTo<br>
availableFrom<br>UNIQUE_ID<br><br><br>A lot of other stuff is going on here which is why the relationships seem a little stupid but... I guess it's a MANY-to-MANY between Addressing and Timetable.&nbsp; Ive got no idea how i can actually write a dbixc search command to perform this kind of join... is it even possible ? Anything gratefully received<br><br>best,<br>&gt;j<br></div></div><br>
      <hr size=1> 
Yahoo! Answers - Get better answers from someone who knows. <a
href="http://uk.answers.yahoo.com/;_ylc=X3oDMTEydmViNG02BF9TAzIxMTQ3MTcxOTAEc2VjA21haWwEc2xrA3RhZ2xpbmU">Try
it now</a>.</body></html>