phildeman has asked for the wisdom of the Perl Monks concerning the following question:
I am struggling to use DBIx::Class for somewhat of a complex query
This is the SQL statement I want to use:
SELECT distinct d.deptid, d.dept_name FROM rooms r LEFT JOIN departments d ON r.dept=d.deptid WHERE d.deptid != 1 OR d.dept != 3 OR d.dept !=42
If the WHERE clause is too much of an issue, I can always use Perl to remove the specific records I don't need.
Can someone help me convert this into Perl code to use with DBIx::Class.
Thanks for your help.
-Phil-
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using DBIx::Class For Slightly Complex Queries
by poj (Abbot) on Aug 13, 2015 at 19:03 UTC | |
by jeffa (Bishop) on Aug 13, 2015 at 19:16 UTC | |
by phildeman (Scribe) on Aug 13, 2015 at 20:50 UTC | |
Re: Using DBIx::Class For Slightly Complex Queries
by rnewsham (Curate) on Aug 14, 2015 at 11:06 UTC |