Welcome to Sign in | Help

Re: problema sql - union cred ...

  •  12-04-2009, 2:40 PM

    Re: problema sql - union cred ...

    Cam "buruienos", nu-mi place (mai ales UNION):

    SELECT
    s.Customer,
    s.[Week], s.[Month], s.[year], s.Sales, CASE WHEN b.blocked IS NULL THEN 0 ELSE b.blocked END AS blocked
    FROM Sales s
    LEFT OUTER JOIN Blocking b ON
    s.Customer = b.Customer
    AND
    s.Week = b.Week
    AND
    s.[Month] = b.[Month]
    AND
    s.[year] = b.[year]
    UNION
    SELECT
    b.Customer,
    b.[Week], b.[Month], b.[year], CASE WHEN s.Sales IS NULL THEN 0 ELSE s.Sales END AS Sales, b.Blocked
    FROM Blocking b LEFT OUTER JOIN Sales s ON
    b.Customer = s.Customer
    AND
    b.Week = s.Week
    AND
    b.[Month] = s.[Month]
    AND
    b.[year] = s.[year]

    Nu am mai lucrat de mult cu reporting services, nu stiu ce mai poate face. Poate faimosul "tablix" (?????).
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems