Unanswered: selecting from 2 tables in different schemas
Running Oracle 9i.
I have a query that selects from 2 tables each in a different schema. Table 1 contains 50 columns, Table 2 contains 60 columns however the first 3 columns in both tables are identical....Datetime, BSC and CELL.
I wrote a formula which uses columns from the first table and just one column from the second table. When I run the SQL, it just takes ages and ages to run like atleast 10 min to run, after which I just cancelled the query.
If I say
Select A.datetime, A.BSC, A.cell,A.column4, A.column5
from table 1 a, table 2 b
where A.CELL=B.CELL or even A.CELL <> B.CELL
The result is the same cell repeated many times (maybe for all the cells in both tables). In short the result didn't look good to me.
Am I doing something wrong here? Does the number of columns in both tables have to be the same if I want to select columns from both tables in a single query?
Query you wrote is invalid in syntax. If you expect any kind of help, please, post accurate information.
Your query doesn't select any column from "table 2". Do you need "table 2" at all?
Which table belongs to which schema? How do you access a table from a different schema?
What "formula" are you talking about? I don't see any formula here.
What is the expected result?
Perhaps you should create a small and meaningful test case, show what you have and what you'd like to get. Because, all I can say (regarding your "am I doing something wrong here" question) is: yes, you must be doing something wrong.
If it is about us (Croatians), well, we love to think about ourselves as Central Europeans, although during the history we were in Southeastern Europe and Balkans as well. The truth is that - most of the time - we're in deep shit (pardon my French).