Trying to sort this out…
I need a query that will combine both tables into 1 which I have below…
select PersonId, PersonFirstName, PersonLastName
from dbo.Person
UNION
SELECT AdminId as PersonsId, AdminFirstName as PersonsFirstName, AdminLastName as PersonsLastName
from dbo.UserAdmins
I want to create a new column and assign a value for “Person” or “Admin” depending where the record came from. So if record 1-10 came from dbo.Person, the newcolumn will be filled in as “Person”, and if the next 5 came from Admin the newcolumn will be filled in as “Admin”.
This seems relatively simple, but not sure where to begin.
You just need to add a new column with the value you want: