ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using CURRENT_DATE in Where Clause in ESQL code

Post new topic  Reply to topic
 Using CURRENT_DATE in Where Clause in ESQL code « View previous topic :: View next topic » 
Author Message
kumar.shanj
PostPosted: Tue Jan 18, 2011 1:40 am    Post subject: Using CURRENT_DATE in Where Clause in ESQL code Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Tue Jan 18, 2011 1:55 am    Post subject: Reply with quote

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
View user's profile Send private message
kumar.shanj
PostPosted: Tue Jan 18, 2011 2:18 am    Post subject: Reply with quote

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
View user's profile Send private message
fatherjack
PostPosted: Tue Jan 18, 2011 2:59 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 18, 2011 3:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using CURRENT_DATE in Where Clause in ESQL code
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.