I need help in combining two sql queries I have written. One combines data from two tables in one database, one combines data from two databases on the same server.
select *
from visit
join visitapptlist
on visit.visit_id = visitapptlist.visit_id
Select *
from psmprod.dbo.casemain, prod.dbo.appt
where (psmprod.dbo.casemain.appt_id=prod.dbo.visitapptlist.appt_id)
I can run these independently and get what I need. What is the proper format or syntax to combining them?
select *
from visit
join visitapptlist
on visit.visit_id = visitapptlist.visit_id
Select *
from psmprod.dbo.casemain, prod.dbo.appt
where (psmprod.dbo.casemain.appt_id=prod.dbo.visitapptlist.appt_id)
I can run these independently and get what I need. What is the proper format or syntax to combining them?