Table Alias in SubSonic

Posted by rockacola on Stack Overflow See other posts from Stack Overflow or by rockacola
Published on 2010-01-13T01:24:58Z Indexed on 2010/06/16 23:42 UTC
Read the original article Hit count: 671

Filed under:
|
|
|
|

How can I assign alias to tables with SubSonic 2.1?

I am trying to reproduce the following query:

SELECT *
FROM posts P
RIGHT OUTER JOIN post_meta X ON P.post_id = X.post_id
RIGHT OUTER JOIN post_meta Y ON P.post_id = Y.post_id
WHERE X.meta_key = "category"
    AND X.meta_value = "technology"
    AND Y.meta_key = "keyword"
    AND Y.meta_value = "cloud"

I'm am using SubSonic 2.1 and upgrading to 2.2 isn't an option (yet). Thanks.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about sql