Plymouth425
Programmer
Hi,
My apology if this is a repeat.
I could not find a solution for this.
I am new to crystal and Oracle both.
We are using Crystal 9 and Oracle 9
I am having problem in passing DateTime type parameter in SQL expression.
Here are the details:
I have 2 parameter fields in my report.
1. StartDateTime
2. EndDateTime
Both are of type DateTime.
I have a SQL expression field. the code is here:
(
SELECT Count(*)
FROM
(
SELECT DISTINCT(ARDI.DILPN_ID)
FROM TS_AR_PROJDILPN ARDI, TS_AR_TRAORDER ARORDER
WHERE ARDI.STATUS = 'Not-Active' AND
ARDI.DILPN_ID = ARORDER.UNIT_ID AND
ARDI.CREATE_DATE >= {?StartDateTime} AND
ARDI.CREATE_DATE <= {?StartDateTime} AND
UPPER(SUBSTR(ARORDER.LOC_ID_PS,13,2)) = '1B' AND
UPPER(SUBSTR(ARORDER.LOC_ID_PS,7,1)) = 'B'
)DI
)
The problem is in passing the dates parameters.
If I remove those its fine.
The error thrown back reads as:
Query Engine Error: 'HY000:[Oracle][ODBC][Ora]ORA-24374: define not done before fetch or execute and fetch'.
Any help would be highly appreciated.
Thx
My apology if this is a repeat.
I could not find a solution for this.
I am new to crystal and Oracle both.
We are using Crystal 9 and Oracle 9
I am having problem in passing DateTime type parameter in SQL expression.
Here are the details:
I have 2 parameter fields in my report.
1. StartDateTime
2. EndDateTime
Both are of type DateTime.
I have a SQL expression field. the code is here:
(
SELECT Count(*)
FROM
(
SELECT DISTINCT(ARDI.DILPN_ID)
FROM TS_AR_PROJDILPN ARDI, TS_AR_TRAORDER ARORDER
WHERE ARDI.STATUS = 'Not-Active' AND
ARDI.DILPN_ID = ARORDER.UNIT_ID AND
ARDI.CREATE_DATE >= {?StartDateTime} AND
ARDI.CREATE_DATE <= {?StartDateTime} AND
UPPER(SUBSTR(ARORDER.LOC_ID_PS,13,2)) = '1B' AND
UPPER(SUBSTR(ARORDER.LOC_ID_PS,7,1)) = 'B'
)DI
)
The problem is in passing the dates parameters.
If I remove those its fine.
The error thrown back reads as:
Query Engine Error: 'HY000:[Oracle][ODBC][Ora]ORA-24374: define not done before fetch or execute and fetch'.
Any help would be highly appreciated.
Thx