SELECT TOP 10000 "Report"."ReportName", "Report"."SQLText", "REPORTINSTANCE"."ReportDate", "REPORTINSTANCE"."SQLText" FROM "ReportHeader" AS "Report" LEFT OUTER JOIN "dbo"."ReportInstance" AS "REPORTINSTANCE" ON ( "Report"."ReportId" = "REPORTINSTANCE"."ReportId" ) LEFT OUTER JOIN "ReportView" AS "View" ON ( "Report"."ViewId" = "View"."ViewId" ) LEFT OUTER JOIN "ReportViewSource" AS "Data Source" ON ( "View"."SourceId" = "Data Source"."SourceId" ) LEFT OUTER JOIN "dbo"."Organisation" AS "ORGANISATION" ON ( "Data Source"."IpOrg" = "ORGANISATION"."IpOrg" ) WHERE ( "ORGANISATION"."OrgName" IN (N'amteam') AND "Report"."ReportName" IN (N'Applications and Application Details') )