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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:20:51+00:00 2026-06-14T20:20:51+00:00

I have two tables of data for example: Network Status ipaddress time violation 192.168.1.1

  • 0

I have two tables of data for example:

Network Status

ipaddress       time       violation
192.168.1.1     2:00       yes
192.168.1.6     2:00       no
192.168.1.11    2:00       no
192.168.1.1     3:00       no
192.168.1.6     3:00       no
192.168.1.11    3:00       yes

and

Firewall Log

ipaddress       machinetype    location
192.168.1.1     computer       London
192.168.1.6     server         New York
192.168.1.11    server         Bejing

and I wish to merge the data from Firewall Log into the Network Status table so I will have the following:

Network Status

ipaddress       time       violation       machinetype       location
192.168.1.1     2:00       yes             computer          London
192.168.1.6     2:00       no              server            New York
192.168.1.11    2:00       no              server            Bejing
192.168.1.1     3:00       no              computer          London
192.168.1.6     3:00       no              server            New York
192.168.1.11    3:00       yes             server            Bejing

Does anyone have any ideas? I assumed there would be a command to merge tables by a specific column value but after research I have only come across the join and select into commands. But I can’t figure out how to use these to achieve what I want.

Thanks!

  • 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-14T20:20:52+00:00Added an answer on June 14, 2026 at 8:20 pm

    To “merge” this tables you need:

    1) Add “machinetype” and “location” columns to the “Network Status” table:

    ALTER TABLE "Network Status"
      ADD COLUMN "machinetype" TEXT;
    ALTER TABLE "Network Status"
      ADD COLUMN "location" TEXT;
    

    2) Populate them with data

    UPDATE "Network Status" NS
    SET "machinetype" = FL."machinetype",
        "location" = FL."location"
    FROM "Firewall Log" FL
    WHERE FL."ipaddress" = NS."ipaddress"
    

    Or you can create a VIEW and use it to SELECT data as if it is a table:

    CREATE VIEW "Status and log" AS
    SELECT NS."ipaddress", NS."time", NS."violation", FL."machinetype", FL."location"
    FROM "Network Status" NS
    JOIN "Firewall Log" FL ON FL."ipaddress" = NS."ipaddress"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two data tables in a data set for example lets say Servers:
I have two tables with a 1:n relationship: "content" and "versioned-content-data" (for example, an
I have two tables, images and image_data and here is an example of my
i have two data tables with the same structure the first one has one
I have two Tables: Table 1: Questions : QuestionId NUMERIC Title TEXT Test Data
1I have the following two tables (sample data) and need to be able to
I have two tables set up in phpmyadmin- table userid and table data. The
I have a database with two tables: data and file . file_id is a
I have two tables with the following (simplified) structures: table "Factors" which holds data
I have two different tables from which I need to pull data blogs which

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.