Grouper1138
Programmer
I want to thank LB for helping me get this far!
Now my question is this...
How do I format the parameters in the SQL statement?
- Does the {?parament name} syntax work for that?
-----------------------------------------------------
Here's what I've got so far...
SELECT
GL00100.ACTNUMBR_1, GL00100. ACTNUMBR_2, GL00100.ACTNUMBR_3, GL00100.ACTNUMBR_4, GL00100.ACTDESCR, GL20000.JRNENTRY, GL20000.REFRENCE, GL20000.TRXDATE, GL20000.ORMSTRID, GL20000.ORMSTRNM, GL20000.CRDTAMT, GL20000.DEBITAMT
FROM GL00100
INNER JOIN GL20000
ON GL00100.ACTINDX = GL20000.ACTINDX
WHERE GL00100.ACTNUMBR_4 < "5999" AND
GL00100.ACTNUMBR_4 > "8100" and
{GL00100.ACTNUMBR_1} = {?Division} and
{GL00100.ACTNUMBR_2} = {?Location} and
{GL00100.ACTNUMBR_3} = {?Cost Center} and
GL20000.TRXDATE > {?Begin date} AND
GL20000.TRXDATE < {?Ending date}
UNION
SELECT
GL00100.ACTNUMBR_1, GL00100. ACTNUMBR_2, GL00100.ACTNUMBR_3, GL00100.ACTNUMBR_4, GL00100.ACTDESCR, GL30000.JRNENTRY, GL30000.REFRENCE, GL30000.TRXDATE, GL30000.ORMSTRID, GL30000.ORMSTRNM, GL30000.CRDTAMT, GL30000.DEBITAMT
FROM GL00100
INNER JOIN GL30000
ON GL00100.ACTINDX = GL30000.ACTINDX
WHERE GL00100.ACTNUMBR_4 < "5999" AND
GL00100.ACTNUMBR_4 > "8100" and
GL00100.ACTNUMBR_1 = {?Division} and
GL00100.ACTNUMBR_2 = {?Location} and
GL00100.ACTNUMBR_3 = {?Cost Center} and
GL30000.TRXDATE > {?Begin date} AND
GL30000.TRXDATE < {?Ending date}
-----------------------------------------------------
My other question is how to save the SQL query without specifying the parameters up front?
Now my question is this...
How do I format the parameters in the SQL statement?
- Does the {?parament name} syntax work for that?
-----------------------------------------------------
Here's what I've got so far...
SELECT
GL00100.ACTNUMBR_1, GL00100. ACTNUMBR_2, GL00100.ACTNUMBR_3, GL00100.ACTNUMBR_4, GL00100.ACTDESCR, GL20000.JRNENTRY, GL20000.REFRENCE, GL20000.TRXDATE, GL20000.ORMSTRID, GL20000.ORMSTRNM, GL20000.CRDTAMT, GL20000.DEBITAMT
FROM GL00100
INNER JOIN GL20000
ON GL00100.ACTINDX = GL20000.ACTINDX
WHERE GL00100.ACTNUMBR_4 < "5999" AND
GL00100.ACTNUMBR_4 > "8100" and
{GL00100.ACTNUMBR_1} = {?Division} and
{GL00100.ACTNUMBR_2} = {?Location} and
{GL00100.ACTNUMBR_3} = {?Cost Center} and
GL20000.TRXDATE > {?Begin date} AND
GL20000.TRXDATE < {?Ending date}
UNION
SELECT
GL00100.ACTNUMBR_1, GL00100. ACTNUMBR_2, GL00100.ACTNUMBR_3, GL00100.ACTNUMBR_4, GL00100.ACTDESCR, GL30000.JRNENTRY, GL30000.REFRENCE, GL30000.TRXDATE, GL30000.ORMSTRID, GL30000.ORMSTRNM, GL30000.CRDTAMT, GL30000.DEBITAMT
FROM GL00100
INNER JOIN GL30000
ON GL00100.ACTINDX = GL30000.ACTINDX
WHERE GL00100.ACTNUMBR_4 < "5999" AND
GL00100.ACTNUMBR_4 > "8100" and
GL00100.ACTNUMBR_1 = {?Division} and
GL00100.ACTNUMBR_2 = {?Location} and
GL00100.ACTNUMBR_3 = {?Cost Center} and
GL30000.TRXDATE > {?Begin date} AND
GL30000.TRXDATE < {?Ending date}
-----------------------------------------------------
My other question is how to save the SQL query without specifying the parameters up front?