![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Posts: 8
Rep Power: 0
![]() |
SQL Help
Say I have two tables, one being a table of events, and one a table of restritcions. They are related because events have restrictions. Now I want to join the tables so that it lists all the events with corresponding restrictions. Things to note, the event table and restriction tables have already been populated. If you think it'd be easier to talk over AIM my name is TeamElement3, I can show you my ER Diagram or anything else needed to help answer the question.
Thanks in Advance John |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4
![]() |
If you can simply describe both tables, we can get you some help.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Oct 2005
Posts: 8
Rep Power: 0
![]() |
Event:
EID int Time varchar( 16 ) Name varchar( 40 ) Restriction: Name varchar ( 20 ) Make varchar( 10) Type varchar( 10) beginyear int end year int first in each is the primary and foreign key |
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
What exists that's common to both tables? Name? (They have different descriptions.) In other words, what relates an event and a restriction or set of restrictions?
Generally, the reason things like this are conducted in the forum, and not over AIM, is that it makes a wider spread opportunity for you, us, and the other members to learn. It's one reason forums exist.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Oct 2005
Posts: 8
Rep Power: 0
![]() |
I was being foolish previously, I've solved that problem, but ran into a new one!
java.sql.SQLException: ORA-00955: name is already used by an existing object What does this exactly mean? stack trace below: java.sql.SQLException: ORA-00955: name is already used by an existing object at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891) at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093) at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047) at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709) at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:796) at has_res.createTables(has_res.java:37) at has_res.main(has_res.java:112) |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
You are attempting to create a table or index that already exists. There are other objects, but I'd guess it's one of those.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 |
|
Newbie
Join Date: Oct 2005
Posts: 8
Rep Power: 0
![]() |
index as in column name?
|
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
You're writing database code without knowing what an index is?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|