| Author |
query for updating
|
vernon mweetwa
Greenhorn
Joined: Nov 26, 2004
Posts: 24
|
|
Hi, Is it possible to create a single query that can update 2 tables at once when executed and if it is possible, how is the syntax. below is the query i use to update the master patient table and i would like the same query to update another table. how do i add on for the other table? "update master_patient set forename = Substr(forename,1,1),surname=Substr(surname,1,1) where forename is not null " [ February 10, 2005: Message edited by: Bear Bibeault ]
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
|
stored procedure is the answer.
|
 |
vernon mweetwa
Greenhorn
Joined: Nov 26, 2004
Posts: 24
|
|
can anyone transform the given query to include the other update because using stored procedures as requested is what i don't know. thanks
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26193
|
|
Vernon, Why can't you just make 2 JDBC calls?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
vernon mweetwa
Greenhorn
Joined: Nov 26, 2004
Posts: 24
|
|
|
Thanks Jeanne. I used 2 JDBC calls and it has worked.
|
 |
 |
|
|
subject: query for updating
|
|
|