I have this application (in VB6) where - from time to time - I get this error:
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
I can take this SQL and run it in TOAD or any other tool, or even run it in my app, and it works just fine. So why am I getting this error?
Here is the SQL if anyone cares to see:
[pre]
SELECT MYITEM.PSITEM_ITEM_NO,
MYITEM.PSITEM_LONG_DESC1 || ' ' || MYITEM.PSITEM_LONG_DESC2 AS MYITEMDESC,
MYITEM.PSITEM_UNIT_OF_MEASURE,
MYSPEC.PSITEM_SPEC_DESC,
MYITEM.PSITEM_GENERIC_FLAG,
MYITEM.PSITEM_EFFECTIVE_DATE,
MYITEM.PSITEM_EXPIRATION_DATE,
MYITEM.PSITEM_OBSOLETE_ITEM_FLAG
FROM S4240000.V_PSITEM_LIST MYITEM,
S4111000.PSITEM_SPEC_SOURCE MYSPEC
WHERE MYITEM.PSITEM_GENERIC_FLAG = MYSPEC.PSITEM_SPEC_ID (+)
AND (MYITEM.PSITEM_SPEC_YEAR = 84)
AND (MYITEM.PSITEM_OBSOLETE_ITEM_FLAG = 'N')
AND ( (MYITEM.PSITEM_EFFECTIVE_DATE IS NULL AND MYITEM.PSITEM_EXPIRATION_DATE IS NULL)
OR (MYITEM.PSITEM_EFFECTIVE_DATE <= TO_DATE('1/21/2015', 'MM/DD/YYYY')
AND MYITEM.PSITEM_EXPIRATION_DATE IS NULL)
OR (MYITEM.PSITEM_EFFECTIVE_DATE IS NULL
AND MYITEM.PSITEM_EXPIRATION_DATE >= TO_DATE('1/21/2015', 'MM/DD/YYYY'))
OR (MYITEM.PSITEM_EFFECTIVE_DATE <= TO_DATE('1/21/2015', 'MM/DD/YYYY')
AND MYITEM.PSITEM_EXPIRATION_DATE >= TO_DATE('1/21/2015', 'MM/DD/YYYY')))
ORDER BY MYITEM.PSITEM_ITEM_NO
[/pre]
Have fun.
---- Andy
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
I can take this SQL and run it in TOAD or any other tool, or even run it in my app, and it works just fine. So why am I getting this error?
Here is the SQL if anyone cares to see:
[pre]
SELECT MYITEM.PSITEM_ITEM_NO,
MYITEM.PSITEM_LONG_DESC1 || ' ' || MYITEM.PSITEM_LONG_DESC2 AS MYITEMDESC,
MYITEM.PSITEM_UNIT_OF_MEASURE,
MYSPEC.PSITEM_SPEC_DESC,
MYITEM.PSITEM_GENERIC_FLAG,
MYITEM.PSITEM_EFFECTIVE_DATE,
MYITEM.PSITEM_EXPIRATION_DATE,
MYITEM.PSITEM_OBSOLETE_ITEM_FLAG
FROM S4240000.V_PSITEM_LIST MYITEM,
S4111000.PSITEM_SPEC_SOURCE MYSPEC
WHERE MYITEM.PSITEM_GENERIC_FLAG = MYSPEC.PSITEM_SPEC_ID (+)
AND (MYITEM.PSITEM_SPEC_YEAR = 84)
AND (MYITEM.PSITEM_OBSOLETE_ITEM_FLAG = 'N')
AND ( (MYITEM.PSITEM_EFFECTIVE_DATE IS NULL AND MYITEM.PSITEM_EXPIRATION_DATE IS NULL)
OR (MYITEM.PSITEM_EFFECTIVE_DATE <= TO_DATE('1/21/2015', 'MM/DD/YYYY')
AND MYITEM.PSITEM_EXPIRATION_DATE IS NULL)
OR (MYITEM.PSITEM_EFFECTIVE_DATE IS NULL
AND MYITEM.PSITEM_EXPIRATION_DATE >= TO_DATE('1/21/2015', 'MM/DD/YYYY'))
OR (MYITEM.PSITEM_EFFECTIVE_DATE <= TO_DATE('1/21/2015', 'MM/DD/YYYY')
AND MYITEM.PSITEM_EXPIRATION_DATE >= TO_DATE('1/21/2015', 'MM/DD/YYYY')))
ORDER BY MYITEM.PSITEM_ITEM_NO
[/pre]
Have fun.
---- Andy
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.