Hello, I have the following Passthrough querie that works fine:
SELECT pub.sbs."Item-code", pub.sbs."Tool-code", pub.sbs."Station", pub.sbs."Date-run", pub.sbs."Run-hours", pub.sbs."Mfg-qty-base", pub.sbs."Rej-qty-base", pub.sbs."Batch", pub.sbs."Shell", pub.iix."Class-code", pub.iix."Group-code", pub.iix."Customer"
FROM pub.sbs, pub.iix
WHERE (pub.iix."customer" = '5' OR pub.iix."customer" = '5A' OR pub.iix."customer" = '5B' OR pub.iix."customer" = '5C') AND
pub.sbs."Item-code" = pub.iix."Item-code" AND
pub.sbs."Run-hours">0 AND
pub.sbs."Mfg-qty-base">0 AND
(((pub.sbs."Date-run") >= '01/01/2006' And (pub.sbs."Date-run") <= '01/31/2006') AND
((pub.sbs."Station")<>'REWORK') AND ((pub.sbs."Item-code") <> '') AND ((pub.sbs."Order-seq") <> '') AND
((pub.sbs."Tool-code") <> '') AND ((pub.sbs."Station") <> ''))
I want to change it, that instead of having the Date-Run dates coded into the query, that when the query is ran it asks you...so I changed the lines that read:
(((pub.sbs."Date-run") >= '01/01/2006' AND (pub.sbs."Date-run") <= '01/31/2006') AND
to
(((pub.sbs."Date-run") >= [Enter start date] And (pub.sbs."Date-run") <= [Enter end date]) AND
When I run the query, it gives me this error:
ODBC--call failed.
[DataDirect-Technologies][ODBC PROGRESS driver][PROGRESS]Syntax error (7587) (#-20003)
Does anyone know whats up? I have done querys like this before and they work...
SELECT pub.sbs."Item-code", pub.sbs."Tool-code", pub.sbs."Station", pub.sbs."Date-run", pub.sbs."Run-hours", pub.sbs."Mfg-qty-base", pub.sbs."Rej-qty-base", pub.sbs."Batch", pub.sbs."Shell", pub.iix."Class-code", pub.iix."Group-code", pub.iix."Customer"
FROM pub.sbs, pub.iix
WHERE (pub.iix."customer" = '5' OR pub.iix."customer" = '5A' OR pub.iix."customer" = '5B' OR pub.iix."customer" = '5C') AND
pub.sbs."Item-code" = pub.iix."Item-code" AND
pub.sbs."Run-hours">0 AND
pub.sbs."Mfg-qty-base">0 AND
(((pub.sbs."Date-run") >= '01/01/2006' And (pub.sbs."Date-run") <= '01/31/2006') AND
((pub.sbs."Station")<>'REWORK') AND ((pub.sbs."Item-code") <> '') AND ((pub.sbs."Order-seq") <> '') AND
((pub.sbs."Tool-code") <> '') AND ((pub.sbs."Station") <> ''))
I want to change it, that instead of having the Date-Run dates coded into the query, that when the query is ran it asks you...so I changed the lines that read:
(((pub.sbs."Date-run") >= '01/01/2006' AND (pub.sbs."Date-run") <= '01/31/2006') AND
to
(((pub.sbs."Date-run") >= [Enter start date] And (pub.sbs."Date-run") <= [Enter end date]) AND
When I run the query, it gives me this error:
ODBC--call failed.
[DataDirect-Technologies][ODBC PROGRESS driver][PROGRESS]Syntax error (7587) (#-20003)
Does anyone know whats up? I have done querys like this before and they work...