locked
SSRS Help with Two DataSets Queries as one (Oracle Connection thru SSRS) RRS feed

  • Question

  • User918710406 posted

    I need to get information into one SSRS Table. Having troubles getting this to work. Thanks in advance

    Query 1

    select fms.xlib_tenant.tenantname, fms.xlib_org_unit.displayname as OrgDisplayName, fms.xlib_user.displayname as UserDisplayName, fms.xfms_ftx_out.inbound, fms.xfms_ftx_out.pagecount as TotalPagesOut, EXTRACT (MONTH FROM fms.xfms_ftx_out.faxdatetime) as xMonthCreated

    from fms.xfms_ftx_out inner join

    fms.xlib_user on fms.xfms_ftx_out.userid = fms.xlib_user.userid inner join

    fms.xlib_org_unit on fms.xfms_ftx_out.orgunitid = fms.xlib_org_unit.orgunitid inner join

    fms.xlib_tenant on fms.xlib_org_unit.tenantid = fms.xlib_tenant.tenantid

    where fms.xfms_ftx_out.faxdatetime IS NOT NULL  AND fms.xfms_ftx_out.success='1'

    Order By XMONTHCREATED, TENANTNAME, ORGDISPLAYNAME, USERDISPLAYNAME

     

    Query 2

     

    select distinct  fms.xlib_tenant.tenantname, fms.xlib_org_unit.displayname as OrgDisplayName, fms.xlib_user.displayname as UserDisplayName, fms.xfms_ftx_in.pagecount as TotalPagesIn, EXTRACT (MONTH FROM fms.xfms_ftx_in.requestdate) as xMonthCreated

    from fms.xlib_user inner join

    fms.xlib_user_group_map on fms.xlib_user.userid = fms.xlib_user_group_map.userid inner join

    fms.xlib_user_group on fms.xlib_user_group_map.groupid = fms.xlib_user_group.groupid inner join

    fms.xfms_fax_route on fms.xlib_user_group.ownerid = fms.xfms_fax_route.routeid inner join

    fms.xfms_ftx_in on fms.xfms_fax_route.faxnumber = fms.xfms_ftx_in.faxnumber left outer join

    fms.xlib_org_unit on fms.xfms_ftx_in.orgunitid = fms.xlib_org_unit.orgunitid left outer join

    fms.xlib_tenant on fms.xlib_org_unit.tenantid = fms.xlib_tenant.tenantid

    Order By XMONTHCREATED, TENANTNAME, ORGDISPLAYNAME, USERDISPLAYNAME

     

    Wednesday, November 28, 2012 2:59 PM

Answers

  • User1264447444 posted

    if the column count are the same why not just UNION the result set of the two queries?

    Query1
    
    UNION
    
    Query2



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 28, 2012 3:04 PM

All replies

  • User1264447444 posted

    if the column count are the same why not just UNION the result set of the two queries?

    Query1
    
    UNION
    
    Query2



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 28, 2012 3:04 PM
  • User3866881 posted

    Having troubles getting this to work. Thanks in advance

    What problem have you got now?

    And I found that you have both standard SQL and LINQ……?

    Thursday, November 29, 2012 2:31 AM