[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Inconsistent Data Types



The data type is Date and I have solved the problem by using 
where to_char(Cal_Date, 'yyyymmdd') <= to_char(to_date($Pay_End_Dt),'yyyymmdd')
instead.
This works quite well.

-----Original Message-----
From: Ven Garlapati [mailto:VXG@creditacceptance.com]
Sent: Thursday, July 31, 2003 1:11 PM
To: sqr-users@sqrug.org
Subject: RE: [sqr-users] Inconsistent Data Types


Hi Dan:
Couple of questions:
what is the data type of call_date (I know you mentioned it as DATA field?) and 
how is the data there (format)?
if call_date is in the 'DD-MON-YY' format (with no minutes and seconds stored, 
then you do not need to use trunc function.

Thanks,
Ven Garlapati 
vxg@creditacceptance.com


-----Original Message-----
From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com]
Sent: Thursday, July 31, 2003 11:35 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Inconsistent Data Types


I get the following error when I test my program code.

SQR 5528 ORACLE OEXEC error -932 in cursor 1:
ORA-00932: inconsistent datatypes

error on Line 344:
(SQR 3735) could not execute SQL.

I am trying to execute the following code

! Lock the current pay period

begin-SQL
update TK_Calendar
  set Cal_Payroll_Code = {LOCKED}
where trunc(Cal_Date) <= trunc($Pay_End_Dt) 
AND Cal_Payroll_Code = {OPEN}
end-SQL

where Cal_Date is a Data field in the Table and Cal_Payroll_Code is CHAR (1) 
field.
$Pay_end_Dt is keyed in on an input statement as the date dd-mmm-yy. As I 
understand it $ can mean either a Date or character field.

Could someone tell me what I'm doing wrong?

Daniel E. Chrisman
Senior Analyst
Ponca City Refinery
ETN 442.5654
DDE 580.767.5654

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users