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

  • SEARCH
  • Home
  • 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 6224375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:39:36+00:00 2026-05-24T08:39:36+00:00

I have 4 tables, Table a, Table b and Table c have same field

  • 0

I have 4 tables, Table a, Table b and Table c have same field names but Table d is having different field names, but I need to join the queries and have to be exported as a CSV file.

       select a.name,a.age,b.addr from a,b where a.rid=b.tid UNION select 
       a.name,a.age,c.addr from a,c where a.uiroll=c.piroll

I need to join table d also , but it has some fields and what I require are d.group and d.project and they are related to table a as d.uon=a.von

The result in cvs file should be as

     name     age     addr    group    project

and also the values.

  • 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-24T08:39:37+00:00Added an answer on May 24, 2026 at 8:39 am

    Did you try something like :

    SELECT a.name, a.age, b.addr, d.group, d.project 
    FROM a, b, d 
    WHERE a.rid=b.tib 
    AND d.uon=a.von 
    UNION 
    SELECT a.name, a.age, c.addr, d.group, d.project 
    FROM a, c, d 
    WHERE a.uiroll=c.piroll 
    AND d.uon=a.von
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables with exactly the same fields. Table A contains 7160 records
I have 3 similar tables, that would all have the same enum type field.
I have a few tables that have similar fields but not exactly the same.
I have a table and two databases which have the same table, but one
Is it possible to have same table name on different schema with different data
I have two tables with the same columns, and I need to copy one
I have a LINQ-to-SQL data context in which two tables exist with different names
I have a number of LINQ to SQL tables with the same fields (
I have a query which searches two separate fields in the same table... looking
I have a table containing primary key and foreign key that references same table.

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.