Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Create new table by merging two existing tables?

$
0
0

Hello all,

We are trying to repair/update programs and databases. We have two tables that house the same kinds of data. Meaning the columns are the same, but the data within them are of different values. We would like to bring these two tables together as a new table.

As an example, imagine having two tables. The first is for tickets that are open, "ticket_open". The second is for tickets that are closed, "ticket_closed". Our programs add new tickets to the "ticket_open" table. They exists there until the ticket is closed, at which time our program removes it from "ticket_open" and adds it to "ticket_closed".

We believe this process is tedious for both our SQL Server, and our programs. So we would like to create a new table, fill it with existing information from both tables, and utilize a boolean value to signify whether the ticket is...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>