I split the original table into 3 tables, and now I want to create a table/view that is equivalent to the original table, but I couldn't get it work at all. Below:
CREATE TABLE BUSINESS_DATES
AS(
SELECT
ttxid,
dba_start_date,
dba_end_date,
location_start_date,
location_end_date
FROM BUSINESSLOCATION
ORDER BY dba_start_date
) WITH DATA;
CREATE TABLE BUSINESS_OWNERS
AS(
SELECT
ttxid,
certificate_number,
ownership_name,
dba_name
FROM BUSINESSLOCATION
) WITH DATA;
CREATE TABLE BUSINESS_INFO
AS(
SELECT
ttxid,
full_business_address,
city,
state,
business_zip,
mailing_address_1
FROM BUSINESSLOCATION
) WITH DATA;
The SQL command I used to combine all tables:
CREATE VIEW ORIGINAL_TABLE
AS (
SELECT *
FROM BUSINESS_DATES AS BD
LEFT JOIN BUSINESS_OWNERS AS BO
ON BA.ttxid = BO.ttxid
) WITH DATA;