0
votes

I am trying to create TFIDF table. Below is my code:

CREATE TABLE TF_IDF2 (FILEID, WORD, TFIDF)AS
select TF.FILEID, TF.WORD, (TF.FREQ*B.IDF) AS TFIDF
from TF JOIN IDF B
ON TF.WORD=B.WORD;

Error message:

SQL Error: ORA-00918: column ambiguously defined
00918. 00000 - "column ambiguously defined"`.

The error points to WORD in the last line of the query. Thanks.

1
I removed the lost line of the code. - Q-ximi
Why are you using group by when you don't have an aggregate function? (If you did need one they'd need to specify which table you're using there too, i.e. group bt TF.WORD; but you don't seem to here). - Alex Poole

1 Answers

0
votes

Try this my friend:

CREATE TABLE TF_IDF2 AS
select TF.FILEID, TF.WORD, (TF.FREQ * B.IDF) AS TFIDF
from TF JOIN IDF B
ON TF.WORD=B.WORD;