on 02-06-2009 10:50 AM
Hi Oracle gurus,
We are trying to perform inserts and updates within an ORACLE table where a TIME field exists without suscess. We are trying to code it using Native SQL.
EXEC SQL.
INSERT INTO table (field1[name], field2[age], field3[birthday], field4[hour])
VALUES (:name, :age, TO_DATE(:date_birth), ¿:hour?)
ENDEXEC.
EXEC SQL.
UPDATE table SET field3[birthday] = TO_DATE(:date_birth), field4[hour] = ¿:hour?
WHERE field1[name] = :name AND field2[age] = :age
ENDEXEC.
Which is the right coding sentence in order to achieve our goal?
Many thanks in advance. Best regards,
Imanol
The below works for me...pls try
insert into sap_text
(mandt, sap_id , origin , tdfdate)
values ('250' , '0000040123' , 'R3D' , to_date('2003/05/03', 'yyyy/mm/dd'));
BR,
Krishna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
There is no TIME datatype in oracle. There is only a TIMESTAMP or DATE type or the field is VARCHAR2 as most date fields in a SAP database are. To help you we would need the real field type. If possible you please do a desc <owner>.<table> in a sqlplus session and give us the field type.
If possible also supply the error you get.
Regards, Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.