dbodenheimer
IS-IT--Management
Hi, I have a report that uses 2 tables for the results. Sounds simple right? well one of the tables stays the same, while the other changes. I would like to be able to pass the table name to the report and have the SQL statement change. Is there any way to do this?
Here is the SQL
Here is the SQL
Code:
SELECT
PEPHR0303."LastName", PEPHR0303."FirstName", PEPHR0303."MI", PEPHR0303."SSN", PEPHR0303."DOB", PEPHR0303."HireCode", PEPHR0303."Region", PEPHR0303."PositionCode", PEPHR0303."HireType", PEPHR0303."HireDate",
Wip."InquiryType", Wip."DateCompleted", Wip."hit", Wip."Info1", Wip."Info2", Wip."DontBill", Wip."CollectionDate"
FROM
{ oj "ops"."dbo"."?tbl" ?tbl INNER JOIN "ops"."dbo"."Wip" Wip ON ?tbl."SSN" = Wip."SSN"}
WHERE
Wip."InquiryType" = 37 AND
Wip."DontBill" = 0 AND
Wip."Info1" <> ''
ORDER BY
?tbl."HireCode" ASC, ?tbl."Region" ASC