aspose file tools*
The moose likes Oracle/OAS and the fly likes inserts into join tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "inserts into join tables" Watch "inserts into join tables" New topic
Author

inserts into join tables

Bob Kimmel
Greenhorn

Joined: Aug 27, 2003
Posts: 26
Im having problem getting the syntax
right to insert into join tables. I
can view the in in a select so the joins are
good.
This is how I thought is should look
like:

Thanks,
Bob
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Bob, I don't quite understand your question.
If you are wondering why the first one gives you an error? It is because "(test_this_name)" is not a column in your table you are inserting to. So of course it will give you an invalid column error.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Bob Kimmel
Greenhorn

Joined: Aug 27, 2003
Posts: 26
What I was trying to do is add a new row a data using the insert
and select statement. I have three tables that have like primary keys
and I joined them together hoping to be able to add data with one insert
statement. After reading some more this weekend, I dont think I can do it this way, unless you know of some trick. Next Im going to make a view of the three table and try to insert into the view. Any other suggestions?
I'm fairly new so be nice:-)
Thanks,
Bob
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Well, I am still confused at what you are doing. If you have one table you are inserting into, then what you want to do is possible. I have many insert statements that are records inserted from a Select statement. Just like thus

My joins are in a where clause, but they can use the ANSI join standards codes. Anything you want.
Also in my example the resultset structure matches the structure of the insertTable.
Hope that helps.
Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: inserts into join tables