[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
I think the problem is here:
trunc($Pay_End_Dt)
trunc is a numerical operator but you are passing it a sting or date variable.
Also, you may need a second argument in the trunc call, something like this:
trunc(#number, #trunc_position)
Not sure if you really need trunc or something else, maybe a dateadd???
-----Original Message-----
From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com]
Sent: Thursday, July 31, 2003 10: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