Tuesday, March 27, 2012

Creating View Problem

Hi all. I'm new to SQL Server and I've run into a tough problem. I currently have a SQL Server database with 54 US states/territories tables. I'm working on creating a view so that I can view all the states data in a single table-like structure. I've mapped all the columns from all the different tables to their new names and made sure that all the new attributes match. When I use the Management Express tool to open the view, it executes but fails because for some reason it's chosen to map a field called 'id' into an int, rather than a varchar. Is there a way to force the view to treat the 'id' as a varchar and not an int? I can't see a way to change its type through the GUI tools.First off, Hi Jeff, welcome to the MSDN boards!

Are you confident that all the id fields are a varchar? Its just normally I see these as an int.

Second off, does it give you a particular error message?

Lastly, can you provide the code you are using to create the view as this helps us find you a solution much more easily.

Regards,
Barry Andrew|||
Hey Barry,
Upon further inspection, I found that all but one of the tables used in the view had ID as a varchar. The one that had it as an int caused issues with one of the tables who varchar ids were too large to fit in an int. I know it is strange practice to keep IDs as varchars, but this is third party data so we have very little control of the format it comes in as.

Changing all the IDs from the tables to varchar allowed the view creation to work. However, using the Management Express tool I was unable to import the data into its own new database. Here's my view definition:

CREATE VIEW hdp_sor AS
SELECT Name AS full_name,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS work_full_address,
'' AS vehicle_state,
'' AS name,
'' AS case_number,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS crime_location,
'' AS city_state_zip,
'' AS vehicle_license_number,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS middle_name,
'' AS controlling_agency,
'' AS vehicle_year,
'' AS build,
'' AS offense,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS work_address,
'' AS registration_date,
'' AS release_date,
'' AS vehicle_model,
'' AS skin_tone,
'' AS supervising_agency,
'' AS offense_location,
'' AS date_registered,
'' AS conviction_location,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS vehicle_make,
'' AS risk_level,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
ID AS id,
Aliases AS alias,
CurrentStatus AS status,
Race AS race,
Sex AS sex,
Hair AS hair_color,
Eyes AS eye_color,
Height AS height,
Weight AS weight,
DateOfBirth AS date_of_birth,
Employer AS employer,
AddressInfoLastUpdatedOn AS address_last_verified,
RegistrationAddress AS address1,
RegistrationAddressCity AS city,
RegistrationAddressState AS state,
RegistrationAddressZip AS zip_code,
EmployerAddress AS work_address1,
EmployerAddressCity AS work_city,
EmployerAddressState AS work_state,
EmployerAddressZip AS work_zip,
Court AS court,
ConvictionDate AS conviction_date,
OffenseDate AS offense_date,
OffenseCode AS offense_code,
PhotoName AS image_filename

FROM dbo.SORAK

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS offense,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Race AS race,
Sex AS sex,
DateOfBirth AS date_of_birth,
Height AS height,
Weight AS weight,
EyeColor AS eye_color,
HairColor AS hair_color,
Street AS address1,
City AS city,
State AS state,
Zip AS zip_code,
RegistrationDate AS registration_date,
County AS county,
ReleaseDate AS release_date,
CaseNumber AS case_number,
CrimeLocation AS crime_location,
TrialLocation AS trial_location,
PhotoName AS image_filename,
OffenseDescription AS offense_description

FROM dbo.SORAL

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS eye_color,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS height,
'' AS build,
'' AS offense,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS weight,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Street AS address1,
City AS city,
StateZip AS zip_code,
County AS county,
Race AS race,
Sex AS sex,
DateOfBirth AS date_of_birth,
Charge AS offense_description,
RiskLevel AS risk_level,
PhotoName AS image_filename
FROM dbo.SORAR

UNION ALL
SELECT ID AS id,
'' AS date_of_birth,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
StreetAddress AS address1,
City AS city,
[State/Zip] AS state_and_zip,
AddressLastVerified AS address_last_verified,
Race AS race,
Age AS age,
Sex AS sex,
Height AS height,
Weight AS weight,
Eyes AS eye_color,
Hair AS hair_color,
Offenses AS offense,
RiskLevel AS risk_level,
PhotoName AS image_filename
FROM dbo.SORAZ

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Address AS address1,
County AS county,
Zip AS zip_code,
Birthdate AS date_of_birth,
Sex AS sex,
Height AS height,
Weight AS weight,
EyeColor AS eye_color,
HairColor AS hair_color,
Ethnicity AS race,
Offense_Code AS offense_code,
Offense_Descr AS offense,
Scars_Tattoos AS scars_and_marks,
Alias AS alias,
PhotoFile AS image_filename
FROM dbo.SORCA

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS height,
'' AS build,
'' AS offense,
'' AS work_state,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS address1,
'' AS class,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
DateOfBirth AS date_of_birth,
Convictions AS convictions,
Race AS race, Gender AS sex, Height AS height,
Weight AS weight,
Hair AS hair_color,
Eyes AS eye_color,
ScarsMarksTatoos AS scars_and_marks,
LastReportedAddress AS full_address,
Aliases AS alias,
Comments AS comments,
Category AS category,
PhotoName AS image_filename
FROM dbo.SORCO

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Alias AS alias,
DateOfBirth AS date_of_birth,
RegistrationAddress AS address1,
RegistrationAddressCity AS city,
[RegistrationAddressState/Zip] AS state_and_zip,
Race AS race,
Eyes AS eye_color,
Sex AS sex,
Hair AS hair_color,
Height AS height,
Weight AS weight,
ScarsMarksTattoos AS scars_and_marks,
DateRegistered AS date_registered,
DateConvicted AS date_convicted,
Compliance AS compliance,
PhotoName AS image_filename,
CrimeRequiringRegistration AS offense_code,
Description AS offense
FROM dbo.SORCT

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS race,
'' AS category,
'' AS compliance,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS address1,
'' AS class,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS image_date,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
HomeAddress AS full_address,
WorkAddress AS full_work_address,
DateOfBirth AS date_of_birth,
Age AS age,
Height AS height,
Weight AS weight,
Eyes AS eye_color,
Hair AS hair_color,
IdentifyingMarks AS scars_and_marks,
OffenseOfConviction AS offense,
DateOfConviction AS conviction_date,
CaseNo AS case_number,
AgeOfVictim AS victim_age,
DateOfLastVerification AS date_last_verified,
DateOfRegistration AS date_registered,
Wanted AS wanted,
PhotoName AS image_filename
FROM dbo.SORDC

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS offense_location,
'' AS supervising_agency,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Sex AS sex,
DateOfBirth AS date_of_birth,
Height AS height,
Weight AS weight,
Race AS race,
Hair AS hair_color,
Eyes AS eye_color,
Skin AS skin_tone,
StreetAddress AS address1,
County AS county,
City AS city,
[State/Zip] AS state_and_zip,
Aliases AS alias,
Risk AS risk_level,
RegisteredOn AS date_registered,
ConvictedStatute AS offense_code,
ConvictedDescription AS offense,
ConvictedVictimInfo AS victim,
LastKnownEmployerAddress AS full_work_address,
LastKnownEmployerName AS employer,
PoliceAgency AS controlling_agency,
PhotoName AS image_filename
FROM dbo.SORDE

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
Name AS full_name,
FirstName AS first_name,
MiddleName AS middle_name,
LastName AS last_name,
Suffix AS suffix,
Aliases AS alias,
Status AS status,
DOB AS date_of_birth,
Race AS race,
Sex AS sex,
Height AS height,
Hair AS hair_color,
Eyes AS eye_color,
Weight AS weight,
ScarsMarksTattoos AS scars_and_marks,
Address AS address1,
City AS city,
State AS state,
Zip AS zip_code,
County AS county,
CrimeDescription AS offense,
CourtCaseNumber AS case_number,
PhotoDate AS image_date,
PhotoName AS image_filename
FROM dbo.SORFL

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS first_name,
Race AS race,
Name AS full_name,
Sex AS sex,
DOB AS date_of_birth,
Height AS height,
Weight AS weight,
HairColor AS hair_color,
EyeColor AS eye_color,
ScarsMarksTattoos AS scars_and_marks,
Incarcerated AS incarcerated,
Address AS address1,
City AS city,
State as state,
Zip as zip_code,
County as county,
Crime as offense,
ConvictionDate as conviction_date,
RegistrationDate as registration_date,
PhotoName as image_filename
FROM dbo.SORGA

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS race,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS eye_color,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS height,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS weight,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS address1,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Birthdate AS date_of_birth,
Physical_address AS full_address,
Offense AS offense, Age_of_Victim AS victim_age,
where_crime_occured AS crime_location,
photoFile AS image_filename
FROM dbo.SORGuam

UNION ALL
SELECT ID AS id,
'' AS date_of_birth,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS race,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS eye_color,
'' AS crime_location,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS height,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_city,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS weight,
'' AS sentence,
'' AS last_updated,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Status AS status,
PhotoLastUpDate AS image_date,
PhotoPath AS image_filename,
[Last Known Personal Vehicle Make] AS vehicle_make,
Model AS vehicle_model,
[License #] AS vehicle_license_number,
Color AS vehicle_color,
Year AS vehicle_year,
[Place of Offense] AS offense_location,
[Covered Offense] AS offense,
[Last Known Address Street Address] AS address1,
[Last Known Address Zip] AS zip_code,
[Last Known Employer Address Street Address] AS work_address1,
[Last Known Employer Address Zip] AS work_zip_code
FROM dbo.SORHI

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS image_date,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
County as county,
Address as address1,
City as city,
[State/Zip] as state_and_zip,
Sex as sex,
Race as race,
Height as height,
Weight as weight,
Hair as hair_color,
Birthday as date_of_birth,
Eyes as eye_color,
Markings as scars_and_marks,
RiskAssessment as risk_level,
ConvictionDate as conviction_date,
Conviction as offense,
ConvictionVictimAge as victim_age,
ConvictionVictimGender as victim_sex,
PhotoName as image_filename
FROM dbo.SORIA

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS race,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS eye_color,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS height,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS weight,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
DateOfBirth as date_of_birth,
StreetAddress as address1,
[City/State/Zip] as city_state_zip,
Offense as offense,
PlaceOfConviction as conviction_location,
PhotoName as image_filename,
OffenseDate as offense_date
FROM dbo.SORID

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS eye_color,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
AliasNames as alias,
DateOfBirth as date_of_birth,
Height as height,
Weight as weight,
Race as race,
Sex as sex,
Address as address1,
City as city,
State as state,
Zip as zip_code,
Crimes as offense,
Title as title,
PhotoName as image_filename,
Status as status,
StateOfConviction as conviction_location
FROM dbo.SORIL

UNION ALL
SELECT ID as id,
'' AS date_of_birth,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS supervising_agent,
'' AS last_updated,
'' AS vehicle_model,
'' AS registration_date,
'' AS work_address,
'' AS offense_code,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
Sex as sex,
Aliases as alias,
Age as age,
Race as race,
Complexion as skin_tone,
Height as height,
Weight as weight,
EyeColor as eye_color,
HairColor as hair_color,
Build as build,
ResidenceAddress as address1,
ResidenceCity as city,
ResidenceState as state,
ResidenceZip as zip_code,
ResidenceCounty as county,
EmployerName as employer,
EmployerAddress as work_address1,
EmployerCity as work_city,
EmployerState as work_state,
EmployerZip as work_zip_code,
EmployerCounty as work_county,
OffenderType as class,
Released as release_date,
Remarks as comments,
Charge as offense,
ConvictionCounty as conviction_location,
ConvictionDate as conviction_date,
PhotoName as image_filename,
Sentence as sentence
FROM dbo.SORIN

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS eye_color,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS height,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS weight,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
OffenderType as class,
Address as address1,
[City/State/Zip] as city_state_zip,
County as county,
Race as race,
Sex as sex,
DateOfBirth as date_of_birth,
RegisteredSince as registration_date,
Offense as offense,
PhotoName as image_filename
FROM dbo.SORKS

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
ResidenceStreetAddress as address1,
ResidenceCity as city,
[ResidenceState/Zip] as state_and_zip,
ResidenceCounty as county,
DOB as date_of_birth,
Sex as sex,
Aliases as alias,
Height as height,
Weight as weight,
HairColor as hair_color,
EyeColor as eye_color,
Race as race,
DateRegistered as registration_date,
OffenderType as class,
Offenses as offense,
Remarks as comments,
PhotoName as image_filename
FROM dbo.SORKY

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS vehicle_year,
'' AS full_name,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
FirstName as first_name,
MiddleName as middle_name,
LastName as last_name,
Aliases as alias,
InitialRegistration as registration_date,
LastKnownAddress as address1,
City as city,
Parish as county,
Zip as zip_code,
Employer as employer,
DOB as date_of_birth,
Sex as sex,
Height as height,
Weight as weight,
EyeColor as eye_color,
HairColor as hair_color,
Ethnicity as race,
ConvictionDate as conviction_date,
OffenseDescription as offense,
ScarsMarksTattoos as scars_and_marks,
PhotoDate as image_date,
PhotoName as image_filename
FROM dbo.SORLA

UNION ALL
SELECT ID as id,
'' AS date_of_birth,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS suffix,
'' AS category,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS address1,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
Age as age,
Race as race,
Sex as sex,
Height as height,
Weight as weight,
HairColor as hair_color,
EyeColor as eye_color,
HomeAddress as full_address,
HomeAddressCounty as county,
WorkAddress as full_work_address,
WorkAddressCounty as work_county,
Offense as offense,
ConvictionDate as conviction_date,
PhotoName as image_filename
FROM dbo.SORMA

UNION ALL
SELECT Name as name,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS race,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS eye_color,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS full_name,
'' AS height,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS weight,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
ID as id,
StreetAddress as address1,
[State/Zip] as state_and_zip,
Charge as offense,
DateOfBirth as date_of_birth,
CurrentRegistrationDate as registration_date,
Age as age,
Status as status,
PhotoName as image_filename
FROM dbo.SORMD

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS race,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS eye_color,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS height,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS weight,
'' AS work_zip_code,
'' AS sentence,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Birthdate AS date_of_birth,
Address AS address1,
Place_of_employment AS employer,
[Case] AS case_number,
photoFile AS image_filename,
Offense AS offense,
Conviction_Statute AS offense_code,
Court AS court,
DatabaseLastUpdate AS last_updated
FROM dbo.SORME

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Sex AS sex,
Race AS race,
Dob AS date_of_birth,
Height AS height,
Weight AS weight,
Hair AS hair_color,
Eye AS eye_color,
City AS city,
State AS state,
Address AS address1,
Zip AS zip_code,
Offense AS offense_code,
Description AS offense,
Alias AS alias,
photoFile AS image_filename
FROM dbo.SORMI

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS registration_date,
'' AS work_address,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
BirthDate AS date_of_birth,
[Race/Ethnicity] AS race,
SkinTone AS skin_tone,
HairColor AS hair_color,
EyeColor AS eye_color,
Height AS height,
Weight AS weight,
Build AS build,
SupervisingAgent AS supervising_agent,
OffenseStatutes AS offense_code,
ReleaseDate AS release_date,
OffenseInformation AS offense,
AddressCounty AS county,
RegisteredAddress AS address1,
RegisteredAddressCity AS city,
RegisteredAddressStateZip AS state_and_zip,
Aliases AS alias,
PhotoName AS image_filename
FROM dbo.SORMN

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS work_full_address,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS build,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS comments,
'' AS supervising_agent,
'' AS sentence,
'' AS last_updated,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS status,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS image_date,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
DOB AS date_of_birth,
Height AS height,
Weight AS weight,
Eye AS eye_color,
Hair AS hair_color,
Race AS race,
Gender AS gender,
Street AS address1,
City AS city,
State AS state,
County AS county,
Zip AS zip_code,
Work_place AS employer,
Work_Street AS work_address1,
Work_city AS work_city,
Work_County AS work_county,
Work_state AS work_state,
Work_zip AS work_zip_code,
OperatedVehicleYear AS vehicle_year,
OperatedVehicleMake AS vehicle_make,
OperatedVehicleModel AS vehicle_model,
OperatedVehicleColor AS vehicle_color,
OperatedVehicleLicensePlate AS vehicle_license,
OperatedVehicleState AS vehicle_state,
Offense AS offense,
OffenseDate AS offense_date,
VictimGender AS victim_sex,
VictimAge AS victim_age,
scars_Tattoos AS scars_and_marks,
Alias AS alias,
ConfinementReleaseDate AS release_date,
Photo_file AS image_filename
FROM dbo.SORMO

UNION ALL
SELECT Name as full_name,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS id,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS victim_age,
'' AS convicted_date,
'' AS first_name,
Race as race,
Sex as sex,
DateOfBirth as date_of_birth,
Height as height,
Weight as weight,
EyeColor as eye_color,
HairColor as hair_color,
StreetAddress as address1,
City as city,
State as state,
County as county,
Zip as zip_code,
Status as status,
CrimeLocation as offense_location,
ConvictionDate as conviction_date,
CrimeDescription as offense,
PhotoDate as image_date,
PhotoName as image_filename,
Incarcerated as incarcerated
FROM dbo.SORMS

UNION ALL
SELECT ID AS id,
'' AS date_of_birth,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Aliases AS alias,
Address AS address1,
City AS city,
State AS state,
ZipCode AS zip_code,
County AS county,
Race AS race,
Sex AS sex,
Age AS age,
SkinTone AS skin_tone,
Hair AS hair_color,
Eyes AS eye_color,
Height AS height,
Weight AS weight,
ScarsMarksTattoos AS scars_and_marks,
VictimsSex AS victim_sex,
VictimsAgeRange AS victim_age,
PhotoDate AS image_date,
PhotoName AS image_filename,
MontanaStatute AS offense,
SentenceDate AS conviction_date,
[Level] AS risk_level
FROM dbo.SORMT

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS full_name,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS last_updated,
'' AS vehicle_model,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as name,
Race as race,
Sex as sex,
Height as height,
Weight as weight,
Hair as hair_color,
Eyes as eye_color,
BirthDate as date_of_birth,
Scars_marks_tattoos as scars_and_marks,
Registration_Status as status,
Registration_Date as registration_date,
Conviction_Date as conviction_date,
Release_Date as release_date,
Sentence_Imposed as sentence,
Alias_Name as alias,
street as address1,
State as state,
Zip as zip_code,
City as city,
County as county,
Photo_Date as image_date,
PhotoName as image_filename,
NC_Statute as offense
FROM dbo.SORNC

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS offense,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS comments,
'' AS supervising_agent,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
DOB AS date_of_birth,
Sex AS sex,
Race AS race,
Height AS height,
Eyes AS eye_color,
Weight AS weight,
Hair AS hair_color,
Skin AS skin_tone,
Address AS address1,
city,
County AS county,
State AS state,
Zip AS zip_code,
Work_Address AS work_address1,
Work_city AS work_city,
Work_County AS work_county,
Work_Zip AS work_zip_code,
Work_State AS work_state,
RiskLevel AS risk_level,
Status AS status,
Conviction_Date AS conviction_date,
photoName AS image_filename
FROM dbo.SORND

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Dob AS date_of_birth,
Risk_Level AS risk_level,
Race AS race,
Sex AS sex,
Height AS height,
Weight AS weight,
Hair AS hair_color,
Eyes AS eye_color,
Alias AS alias,
Address AS address1,
City AS city,
State AS state,
County AS county,
ZipCode AS zip_code,
Conviction_crime AS offense,
Court AS court,
Conviction_Date AS conviction_date,
photoFile AS image_filename
FROM dbo.SORNE

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Court AS court,
Aliases AS alias,
DateOfBirth AS date_of_birth,
Race AS race,
Hair AS hair_color,
Sex AS sex,
Height AS height,
Eyes AS eye_color,
Weight AS weight,
LastReportedAddress AS address1,
[City/Zip] AS city_and_zip,
Offense AS offense,
PhotoDate AS image_date,
PhotoName AS image_filename
FROM dbo.SORNH

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
Sex AS sex,
Race AS race,
Height AS height,
Weight AS weight,
Eyes AS eye_color,
Hair AS hair_color,
DateOfBirth AS date_of_birth,
Age AS age,
Status AS status,
Aliases AS alias,
DistinguishingMarks AS scars_and_marks,
OffenseAndConviction AS offense,
Address AS address1,
OffenseAndConvictionDate AS conviction_date,
OffenseAndConvictionPlace AS conviction_location,
MotorVehicleYear AS vehicle_year, MotorVehicleMake AS vehicle_make,
MotorVehicleModel AS vehicle_model,
MotorVehicleState AS vehicle_state,
MotorVehicleLicensePlate AS vehicle_license,
MotorVehicleColor AS vehicle_color,
County AS county,
ImageDate AS image_date,
PhotoName AS image_filename
FROM dbo.SORNJ

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS image_filename,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
DateOfBirth AS date_of_birth,
Age AS age,
Sex AS sex,
Height AS height,
Race AS race,
Hair AS hair,
Weight AS weight,
Eyes AS eye_color,
DateOfConviction AS conviction_date,
PlaceOfConviction AS conviction_location,
PhotoDate AS image_date,
DateOfReRegistration AS registration_date,
Aliases AS alias,
SexOffenseConviction AS offense,
PermanentStreetAddress AS address1,
PermanentCity AS city,
PermanentState AS state,
PermanentZip AS zip_code,
WorkName AS employer,
WorkAddress AS work_full_address
FROM dbo.SORNM

UNION ALL
SELECT Name AS full_name,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS vehicle_year,
'' AS build,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
ID AS id,
FirstName AS first_name,
MiddleName AS middle_name,
LastName AS last_name,
Status AS status,
Aliases AS alias,
TierLevel AS risk_level,
Sex AS sex,
Race AS race,
HairColor AS hair_color,
EyeColor AS eye_color,
Height AS height,
Weight AS weight,
BirthYear AS date_of_birth,
ScarsMarksTattoosDescription AS scars_and_marks,
ConvictionDate as conviction_date,
ConvictionLocation as conviction_location,
ConvictionDescription as offense,
ConvictionStatute as offense_code,
ResidenceAddress as address1,
ResidenceState as state,
ResidenceZip as zip_code,
EmployerAddress as work_address1,
EmployerState as work_state,
EmployerZip as work_zip,
PhotoName as image_filename
FROM dbo.SORNV

UNION ALL
SELECT ID as id,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS vehicle_year,
'' AS full_name,
'' AS build,
'' AS offense,
'' AS image_filename,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
LastName as last_name,
MiddleName as middle_name,
FirstName as first_name,
DateOfBirth as date_of_birth,
Sex as sex,
RiskLevel as risk_level,
Race as race,
Ethnicity as ethnicity,
Weight as weight,
Height as height,
Hair as hair_color,
Eyes as eye_color,
ReportedAddress as address1,
City as city,
ZipCode as zip_code,
State as state,
ConvictionDate as conviction_date,
Sentence as sentence,
ScarsMarksTattoos as scars_and_marks,
AliasFirstName + ' ' + AliasMiddleName + ' ' + AliasLastName AS alias
FROM dbo.SORNY

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
NickName AS alias,
DateOfBirth AS date_of_birth,
Age AS age,
Gender AS sex,
Race AS race,
Height AS height,
Weight AS weight,
Hair AS hair_color,
Eyes AS eye_color,
ScarsMarksTattoos AS scars_and_marks,
Offenses AS offense,
ResidentialAddress AS address1,
ResidentialCity AS city,
[ResidentialState/Zip] AS state_and_zip,
ResidentialCounty AS county,
WorkAddress AS work_address1,
WorkCity AS work_city,
[WorkState/Zip] AS work_state_and_zip,
WorkCounty AS work_county,
PhotoName AS image_filename
FROM dbo.SOROH

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Alias AS alias,
Age AS age,
Race AS race,
DOB AS date_of_birth,
Sex AS sex,
Height AS height,
Weight AS weight,
Hair AS hair_color,
Eye AS eye_color,
Body_mark AS scars_and_marks,
Address AS address1,
City AS city,
State AS state,
Zip AS zip_code,
County AS county,
Conviction_date AS conviction_date,
Registration_status AS status,
photoFile AS image_filename,
Offense AS offense
FROM dbo.SOROK

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS vehicle_year,
'' AS build,
'' AS offense,
'' AS image_filename,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
County as county,
Name as full_name,
DOB as date_of_birth,
Gender as sex,
Hair as hair_color,
Race as race,
Eyes as eye_color,
Height as height,
Weight as weight,
SupervisingAgency as supervising_agency,
Address as address1,
City as city,
State as state,
Zip as zip_code,
LastName as last_name,
FirstName as first_name,
MiddleName as middle_name
FROM dbo.SOROR

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS suffix,
'' AS race,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS eye_color,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS height,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS weight,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS sex,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Aliases AS alias,
YearOfBirth AS date_of_birth,
Title AS title,
ResidenceAddressStreetAddress AS address1,
[ResidenceAddressCity&ZipCode] AS city_and_zip,
ResidenceAddressCountyOfResidence AS county,
[EmploymentAddressCity&ZipCode] AS work_city_and_zip,
EmploymentAddressCountyOfEmployer AS work_county,
PhotoName AS image_filename,
TypeOfOffense AS offense,
DateOfConviction as conviction_date
FROM dbo.SORPA

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS race,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS vehicle_year,
'' AS build,
'' AS offense,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
Name AS full_name,
FirstName AS first_name,
MiddleName AS middle_name,
LastName AS last_name,
Suffix AS suffix,
Sex AS sex,
Height AS height,
Weight AS weight,
Hair AS hair_color,
Eyes AS eye_color,
DOB AS date_of_birth,
ScarsMarksTattoos AS scars_and_marks,
CurrentAddress AS address1,
CurrentCity AS city,
CurrentState AS state,
CurrentZip AS zip_code,
PhotoName AS image_filename
FROM dbo.SORPuertoRico

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
Dob as date_of_birth,
Sex as sex,
Address as address1,
Race as race,
Height as height,
Weight as weight,
Hair as hair_color,
Offense as offense,
Eye as eye_color,
photoFile as image_filename
FROM dbo.SORRI

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS registration_date,
'' AS work_address,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
Alias as alias,
Sex as sex,
Race as race,
DOB as date_of_birth,
Height as height,
Weight as weight,
EyeColor as eye_color,
HairColor as hair_color,
SkinTone as skin_tone,
StreetAddress as address1,
City as city,
State as state,
Zip as zip_code,
County as county,
DateOfConviction as conviction_date,
Offense as offense,
AgeOfVictim as victim_age,
SexOfVictim as victim_sex,
SentenceReleaseDate as release_date,
PhotoName as image_filename,
DateOfPhoto as image_date
FROM dbo.SORSC

UNION ALL
SELECT Name as full_name,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
ID as id,
Alias as alias,
Race as race,
Gender as sex,
DOB as date_of_birth,
Height as height,
Weight as weight,
Hair as hair_color,
Eyes as eye_color,
Crime_Description as offense,
Conviction_Date as conviction_date,
Address as address1,
City as city,
County as county,
State as state,
Zip as zip_code,
photoName as image_filename
FROM dbo.SORSD

UNION ALL
SELECT Name as full_name,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS hair_color,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS eye_color,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS height,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS weight,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
ID as id,
Alias as alias,
County as county,
Race as race,
Sex as sex,
Address as address1,
City as city,
State as state,
ZipCode as zip_code,
Dob as date_of_birth,
Offense as offense,
photoFile as image_filename
FROM dbo.SORTN

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS vehicle_year,
'' AS build,
'' AS offense,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS comments,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS image_date,
'' AS convicted_date,
'' AS incarcerated,
VictimSex AS victim_sex,
VictimAge AS victim_age,
Name AS full_name,
Sex AS sex,
Race AS race,
DOB AS date_of_birth,
[Ident.Height] AS height,
Weight AS weight,
Eye AS eye_color,
Hair AS hair_color,
RiskLevel AS risk_level,
City AS city,
Address AS address1,
County AS county,
State AS state,
Zip AS zip_code,
RegistrationDate AS registration_date,
PhotoName AS image_filename,
FirstName AS first_name,
LastName AS last_name,
MiddleName AS middle_name,
AKA as alias,
VerificationDate as verification_date
FROM dbo.SORTX

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
ResidenceAddress as address1,
ResidenceStateZip as state_and_zip,
Ethnicity as race,
Sex as sex,
Height as height,
Weight as weight,
Eyes as eye_color,
Hair as hair_color,
DOB as date_of_birth,
Age as age,
Aliases as alias,
CurrentVehicles as vehicle,
PhotoName as image_filename,
OffenseConvicted as convicted_date,
Offense as offense
FROM dbo.SORUT

UNION ALL
SELECT ID as id,
'' AS date_of_birth,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS vehicle_year,
'' AS full_name,
'' AS build,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS comments,
'' AS supervising_agent,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS skin_tone,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
FirstName as first_name,
MiddleName as middle_name,
LastName as last_name,
Suffix as suffix,
Aliases as alias,
Sex as sex,
Race as race,
Height as height,
Age as age,
EyeColor as eye_color,
Weight as weight,
HairColor as hair_color,
DateOfInitialRegistration as registration_date,
HomeAddress as address1,
HomeCity as city,
HomeState as state,
HomeZip as zip_code,
WorkAddress as work_address,
WorkState as work_state,
WorkCity as work_city,
WorkZip as work_zip_code,
CaseNumber as case_number,
SentencingCourt as court,
DateOfConviction as conviction_date,
Victim as victim,
PhotoDate as image_date,
PhotoName as image_filename,
CodeSection as offense_code,
Statute as offense
FROM dbo.SORVA

UNION ALL
SELECT ID AS id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS address1,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
Alias AS alias,
City AS city,
Dob AS date_of_birth,
Sex AS sex,
Race AS race,
Height AS height,
Eye AS eye_color,
Weight AS weight,
Hair AS hair_color,
photoFile AS image_filename,
Date_of_Conviction AS conviction_date,
Conviction_Information AS offense
FROM dbo.SORVT

UNION ALL
SELECT ID as id,
'' AS date_of_birth,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
Address as address1,
Sex as sex,
Ethnicity as race,
Height as height,
Weight as weight,
Age as age,
HairColor as hair_color,
EyeColor as eye_color,
ConvictingCrime as offense,
LevelOfOffender as risk_level,
PhotoName as image_filename
FROM dbo.SORWA

UNION ALL
SELECT ID as id,
'' AS date_of_birth,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS offense,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
DOCIdentificationNumber as state_id_number,
Aliases as alias,
Gender as sex,
Race as race,
Weight as weight,
Age as age,
Height as height,
EyeColor as eye_color,
HairColor as hair_color,
PhotoDate as image_date,
ConvictionDate as conviction_date,
[Custody/Supervision] as supervising_agency,
RegistrationBegin as registration_date,
ComplianceStatus as status,
ResidenceAddress as address1,
ResidenceCity as city,
[ResidenceState/Zip] as state_and_zip,
ResidenceCounty as county,
PhotoName as image_filename
FROM dbo.SORWI

UNION ALL
SELECT ID AS id,
'' AS work_city_and_zip,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS vehicle_license,
'' AS vehicle,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS scars_and_marks,
'' AS alias,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name AS full_name,
ResidenceAddress AS address1,
ResidenceCity AS city,
ResidenceCounty AS county,
ResidenceStateZip AS state_and_zip,
DateOfBirth AS date_of_birth,
Sex AS sex,
Height AS height,
Weight AS weight,
Hair AS hair_color,
Eyes AS eye_color,
Race AS race,
Ethnicity AS ethnicity,
WorkCounty AS work_county,
WorkCity AS work_city,
ConvictionYear AS conviction_date,
VictimSex AS victim_sex,
Offense AS offense,
PhotoName AS image_filename
FROM dbo.SORWV

UNION ALL
SELECT ID as id,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS offense,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS zip_code,
'' AS comments,
'' AS state,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS address1,
'' AS class,
'' AS scars_and_marks,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS age,
'' AS work_state_and_zip,
'' AS last_name,
'' AS city,
'' AS city_and_zip,
'' AS offense_date,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
AKA as alias,
Address as full_address,
Dob as date_of_birth,
DATE_OF_CONVICTION as conviction_date,
Race as race,
Sex as sex,
Height as height,
Weight as weight,
Eye as eye_color,
Hair as hair_color,
photoFile as image_filename
FROM dbo.SORWY

UNION ALL
SELECT ID as id,
'' AS date_of_birth,
'' AS ethnicity,
'' AS work_city_and_zip,
'' AS work_county,
'' AS suffix,
'' AS category,
'' AS full_work_address,
'' AS compliance,
'' AS case_number,
'' AS name,
'' AS vehicle_state,
'' AS work_full_address,
'' AS victim_sex,
'' AS vehicle_license,
'' AS vehicle,
'' AS county,
'' AS offense_description,
'' AS title,
'' AS verification_date,
'' AS date_last_verified,
'' AS court,
'' AS crime_location,
'' AS vehicle_license_number,
'' AS city_state_zip,
'' AS hair,
'' AS gender,
'' AS state_and_zip,
'' AS controlling_agency,
'' AS middle_name,
'' AS vehicle_year,
'' AS build,
'' AS work_state,
'' AS convictions,
'' AS wanted,
'' AS state_id_number,
'' AS FirstName,
'' AS work_address1,
'' AS work_city,
'' AS supervising_agent,
'' AS work_zip_code,
'' AS sentence,
'' AS last_updated,
'' AS vehicle_model,
'' AS release_date,
'' AS registration_date,
'' AS work_address,
'' AS skin_tone,
'' AS offense_code,
'' AS employer,
'' AS offense_location,
'' AS supervising_agency,
'' AS date_registered,
'' AS conviction_location,
'' AS conviction_date,
'' AS work_zip,
'' AS date_convicted,
'' AS trial_location,
'' AS class,
'' AS victim,
'' AS status,
'' AS vehicle_color,
'' AS work_state_and_zip,
'' AS last_name,
'' AS full_address,
'' AS city_and_zip,
'' AS vehicle_make,
'' AS risk_level,
'' AS address_last_verified,
'' AS image_date,
'' AS victim_age,
'' AS convicted_date,
'' AS incarcerated,
'' AS first_name,
Name as full_name,
Aliases as alias,
Age as age,
Sex as sex,
Height as height,
Weight as weight,
Race as race,
Hair as hair_color,
Eyes as eye_color,
Address as address1,
City as city,
State as state,
Zip as zip_code,
ScarsMarksTattoos as scars_and_marks,
Comments as comments,
OffenseDate as offense_date,
OffenseDescription as offense,
PhotoName as image_filename
FROM dbo.SORYorkCountySC

I don't have the exact error messages as there were several. But the view itself works flawlessly, I am able to load and view all 900K records, just not able to import them into their own new database.

No comments:

Post a Comment