How to write Predicate for query

Posts   
 
    
tprohas
User
Posts: 257
Joined: 23-Mar-2004
# Posted on: 20-Jan-2005 01:56:39   

Can anyone tell me how to write the PredicateFilter for this query?


SELECT
    PV.ProductVersionID, PT.TypeName, P.Model, PV.WSDescription
FROM
    dbo.ProductVersion PV
INNER JOIN
    (
        SELECT
            ID = ProductVersionID
        FROM
            dbo.BottomBracket
        WHERE
            (BottomBracket.Width = 70)
        UNION
        SELECT
            ID = ProductVersionID
        FROM
            dbo.HandlebarTape
        UNION
        SELECT
            ID = ProductVersionID
        FROM
            dbo.RimTape
        UNION
        SELECT
            ID = ProductVersionID
        FROM
            dbo.Saddle
        WHERE
            (Saddle.Gender = 'M')
    )
    C ON C.ID = PV.ProductVersionID
INNER JOIN
    dbo.Product P ON PV.ProductID = P.ProductID
INNER JOIN
    dbo.ProductType PT ON P.ProductTypeID = PT.ProductTypeID
INNER JOIN
    dbo.SetPart SP ON PV.ProductVersionID = SP.ProductVersionID
INNER JOIN
    dbo.PartSet PS ON SP.SetID = PS.SetID
WHERE
    (PS.SetID = 1)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 20-Jan-2005 10:17:47   

in-place temp tables are not yet supported, you can't define the union-ed resultset you're joining with currently. So a view or proc is sadly enough the only option at the moment.

Frans Bouma | Lead developer LLBLGen Pro
tprohas
User
Posts: 257
Joined: 23-Mar-2004
# Posted on: 20-Jan-2005 18:14:37   

Otis wrote:

in-place temp tables are not yet supported, you can't define the union-ed resultset you're joining with currently. So a view or proc is sadly enough the only option at the moment.

Thanks for the reply Otis, I'll try and figure out another way of doing this.

Regards,

Aaron