Home » RDBMS Server » Server Administration » Oracle "insertion problem"
Oracle "insertion problem" [message #374313] Tue, 05 June 2001 08:10 Go to next message
ashok
Messages: 32
Registered: July 2000
Member
Hi,
My problem is I want to pass a string from a java client in a date format. I want to directly pass it in the insert statement without formatting.
EG:
String dates = "10/20/2001";
insert into test values(dates);

I want this query to work. Pl. help me what change i can do in the server to work.
Re: Oracle [message #374315 is a reply to message #374313] Tue, 05 June 2001 08:25 Go to previous messageGo to next message
Cindy
Messages: 88
Registered: November 1999
Member
Try this:

SQL> select TO_CHAR(sysdate,'MM/DD/YYYY') from dual;

TO_CHAR(SY
----------
06/05/2001

THEREFORE:

INSERT into test values(TO_CHAR(your_date_column, 'MM/DD/YYYY'));
Re: Oracle [message #374325 is a reply to message #374313] Tue, 05 June 2001 16:30 Go to previous message
M.H
Messages: 3
Registered: March 2001
Junior Member
hi
i want to use global variable
in database trigger
(global value if i can passed from developer forms
to database trigger)

Thanks
Previous Topic: Try this "Query problem"
Next Topic: rename a column
Goto Forum:
  


Current Time: Mon Dec 23 13:03:27 CST 2024