Author |
Message
|
kumar.shanj |
Posted: Tue Jan 18, 2011 1:40 am Post subject: Using CURRENT_DATE in Where Clause in ESQL code |
|
|
Apprentice
Joined: 18 Nov 2010 Posts: 49
|
I am trying for a SQL query in my ESQL code like :
SET Environment.Variables.ORBIT.ORBITTOASM[] =
(
SELECT
A.PWCUK_LEGACY_ID AS StaffID,
A.PWCE_GUID AS GUID
FROM
Database.PS_PWCUK_EMP_C_VW AS A
WHERE
A.EMPLID IN(00030056491,00030077169)
and
A.EFFDT<CURRENT_DATE
);
But i getting an error stating
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'SET Environment.Variables.ORBIT.ORBITTOASM[ ] = (SELECT COLUMN(0) AS StaffID, COLUMN(1) AS GUID FROM DATABASE(, CURRENT_DATE));'
)
(0x01000000):DatabaseException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbOdbc.cpp'
(0x03000000):Line = 227
(0x03000000):Function = 'ImbOdbcHandle::checkRcInner'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2321
(0x03000000):Text = 'Root SQL exception' (0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '-1'
)
(0x01000000):DatabaseException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbOdbc.cpp'
(0x03000000):Line = 355
(0x03000000):Function = 'ImbOdbcHandle::checkRcInner'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2322
(0x03000000):Text = 'Child SQL exception'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'IM001' )
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '0'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = '[Microsoft][ODBC Driver Manager] Driver does not support this function' )
)
Please help regarding this problem. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jan 18, 2011 1:55 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
How does the text in the exception list marry up with the ESQL code you provided?
Also, using CODE tags makes everything a lot more readable. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kumar.shanj |
Posted: Tue Jan 18, 2011 2:18 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2010 Posts: 49
|
SET Environment.Variables.ORBIT.ORBITTOASM[] =
(
SELECT
A.PWCUK_LEGACY_ID AS StaffID,
A.PWCE_GUID AS GUID
FROM
Database.PS_PWCUK_EMP_C_VW AS A
WHERE
A.EMPLID IN(00030056491,00030077169)
and
A.EFFDT<CURRENT_DATE );
when i am running this code without
A.EFFDT<CURRENT_DATE
condition in where clause it is working fine.
But when i am testing the query with
A.EFFDT<CURRENT_DATE
in where clause, I am getting the above mentioned exception like
(0x03000000):Text = '[Microsoft][ODBC Driver Manager] Driver does not support this function' ) |
|
Back to top |
|
 |
fatherjack |
Posted: Tue Jan 18, 2011 2:59 am Post subject: |
|
|
 Knight
Joined: 14 Apr 2010 Posts: 522 Location: Craggy Island
|
Quote: |
[Microsoft][ODBC Driver Manager] Driver does not support this function |
Maybe, just maybe, your Microsoft ODBC Driver does not support this function  _________________ Never let the facts get in the way of a good theory. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 18, 2011 3:05 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
fatherjack wrote: |
Quote: |
[Microsoft][ODBC Driver Manager] Driver does not support this function |
Maybe, just maybe, your Microsoft ODBC Driver does not support this function  |
Maybe the problem is that CURRENT_DATE is not of the same type as A.EFFDT and that's where the shoe hurts...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|