Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6745643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:13:47+00:00 2026-05-26T12:13:47+00:00

I have two table and I want to merge them TERMS_TABLE ID | TERMS

  • 0

I have two table and I want to merge them

TERMS_TABLE

 ID  | TERMS
 309 | 'hardware'
 309 | 'software'
 309 | 'computer'



TFIDF_TABLE

  ID | TERMS
 309 |'computer,phone,mp3....'

Now I want to add TERMS column of TERMS_TABLE to terms column of TFIDF_TABLE but If TFIDF_TABLE already contains TERMS of TERMS_TABLE then I should not insert this term to the NEW_TFIDF_TABLE , like that

result should be:

NEW_TFIDF_TABLE

  ID | TERMS
 309 |'computer,phone,mp3....,hardware,software'

How can I do that ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:13:48+00:00Added an answer on May 26, 2026 at 12:13 pm

    If you use Oracle 11 you can try this:

    select t3.id, t3.terms||','||t4.terms terms from 
    (
    select t1.id, listagg(t1.terms,',') within group (order by t1.terms)  terms
    from terms_table t1 join tfidf_table t2 on  t1.id=t2.id
    where instr(t2.terms,t1.terms)=0 
    group by t1.id ) 
    t3 right outer join tfidf_table  t4 on t3.id=t4.id
    

    On Oracle 10 you could try

    select t3.id, t3.terms||','||t4.terms terms from 
    (
    select t1.id, wm_concat(t1.terms)  terms
    from terms_table t1 join tfidf_table t2 on  t1.id=t2.id
    where instr(t2.terms,t1.terms)=0 
    group by t1.id ) 
    t3 right outer join tfidf_table  t4 on t3.id=t4.id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two separate table, I want to merge into a single table using
I have two different tables and i decided to merge them into one table...
I have two mysql tables and i want to merge the results of these
I have two table emptable1(empid,status) emptable2(empid,week) i want to select all the empid whose
I want to place a table on my page. I have two tables in
I have two tables with identical structures handling distinct data. I want to merge
I have two tables that I want to query and merge based on a
I have two table i want to add one condition while using LEFT OUTER
I have two tables that I want to join into one table and use
Say I have two tables I want to join. Categories: id name ---------- 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.