Query Prompts Not Being Accepted
Hi all,
I am brand new to Bartender so please keep this in mind!
We are using Enterprise Automation Trial v10.1 SR3 build 2954 on Win7 Pro [x64] SP1.
I have an SQL statement that works fine in its static form:
SELECT icetl.prod, icetl.lotno, icetl.quantity, icetl.orderno, icetl.ordersuf, icetl.lineno, icsel.opendtFROM TESTNXT.PUB.icetl icetl, TESTNXT.PUB.icsel icsel, TESTNXT.PUB.oeeh oeeh WHERE oeeh.orderno = icetl.orderno AND oeeh.cono = icetl.cono AND icsel.cono = icetl.cono AND icsel.lotno = icetl.lotno AND icetl.prod = icsel.prod AND ((oeeh.cono=111) AND (oeeh.orderno=1598576))
Now, if I create a 'Query Prompt' named 'OrderNo' and update the SQL statement as follows, Bartender (well, I guess it's the ODBC driver) complains:
SELECT icetl.prod, icetl.lotno, icetl.quantity, icetl.orderno, icetl.ordersuf, icetl.lineno, icsel.opendt FROM TESTNXT.PUB.icetl icetl, TESTNXT.PUB.icsel icsel, TESTNXT.PUB.oeeh oeeh WHERE oeeh.orderno = icetl.orderno AND oeeh.cono = icetl.cono AND icsel.cono = icetl.cono AND icsel.lotno = icetl.lotno AND icetl.prod = icsel.prod AND ((oeeh.cono=111) AND (oeeh.orderno = ?OrderNo ))
The error I receive is attached.
I have tried altering the relevant part of the statement to "... AND (oeeh.orderno = cast(?OrderNo as int ))" (based on a Google search), but this doesn't help either.
Can someone advise what I am doing wrong? Do I have the syntax for custom variables wrong?
We are currently trialling the demo software for an upcoming project, so any help or assistance would be very much appreciated.
Thank you.
Elliot
-
Do you've the same issue if your database connection setup dialog just connects to the 'oeeh' table (no other tables nor multidatabase joins), and you then create the "OrderNo" Query Prompt and immediately after select the "Browse" tab without modifying the SQL Statement?
Is there an OLE DB provider you can use for this database? If so, what result do you get?
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar