• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

?INSERT in Oracle9i /Java w/ StringBuffer append?

How do I insert a record into Oracle using Java.  For example I have the keyi an SSN. I have to place an letter into a field and place a date into another field. The record is written for the first time.
Thank you in advance    
0
coolgem
Asked:
coolgem
1 Solution
 
MogalManicCommented:
what do you mean by w/ StringBuffer append?


The insert is simple:
insert into table(SSN, updated) values('111-11-1111', to_date('12/12/2005', 'mm/dd/yyyy'))

Using parameters would be better:
insert into table(SSN, updated) values(?, ?)
where the values ?, ? are set by parameters:
0
 
coolgemAuthor Commented:
I was trying to do the INSERT in Java using the StringBuffer java class.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now