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 8210055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:56:33+00:00 2026-06-07T09:56:33+00:00

I am trying to merge some columns from one table into a view that

  • 0

I am trying to merge some columns from one table into a view that contains all the data from another table. So far I have failed, here is what I have so far:

$create = "CREATE VIEW filter AS SELECT `".$db."`.`leads`.*, (`".$db."`.applicants.name AS lead_fname, `".$db."`.applicants.email AS lead_email, `".$db."`.applicants.appdate AS lead_added ) FROM `".$db."`.`leads`, `".$db."`.`applicants` WHERE ".$filterTerms." AND `lead_status` = '1' ORDER BY `lead_added`";

Any help would be appreciated

I think this is what i am trying to achieve:

View = table1 + table2

ID | email | name | appdate
1    data   data   data
2    data   data   data
3    data   data   data
4    data   data   data
5    data   data   data

Table 1

 ID | email | name | appdate
  1    data   data   data
  2    data   data   data

Table 2

 ID | s_email | s_name | s_appdate
 1    data      data   data
 2    data      data   data
 3    data      data   data
  • 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-06-07T09:56:36+00:00Added an answer on June 7, 2026 at 9:56 am

    Based on the updated info, you want a UNION:

    select email, name, appdate from table1
    UNION
    select s_email as email, s_name as name, s_appdate as appdate from table2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to merge some data that I have. The input would look like so:
I'm simply trying to merge 2 xml documents (adding nodes from one into the
I'm trying to merge two docx-documents into one docx-document using OpenXML SDK 2.0. The
I am trying to merge two or more postscript files into one. I tried
I'm trying to merge some data but beyond the basics I get a bit
I am trying to bulk insert some data into an oracle db. I followed
I'm trying to merge two arrays that have some overlapping results and some that
I am trying to merge some code behind code for .net that I found
I'm trying to merge two arrays for the values of array1 that are set
I am trying to merge two data.frames together, based on a common column name

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.