Retrieving data from 2 different databases

liunx

Guest
I am trying to retrieve doctor data and appointment data from the database to bind and view them in the system, this is the SQL command that I used when the data was in the same sql database:

"SELECT Doctors.DoctorCorpNum, Appointments.AppointmentId, AppointmentStatus.AppointmentStatusId, Doctors.Name, Doctors.Phone, AppointmentStatus.AppointmentStatusName, Appointments.AppointDate FROM Appointments INNER JOIN AppointmentStatus ON Appointments.AppointmentStatusId = AppointmentStatus.AppointmentStatusId INNER JOIN Doctors ON Appointments.DoctorCorpNum = Doctors.DoctorCorpNum WHERE (Appointments.AppointDate = CONVERT(DATETIME, '" & date1 & "', 102)) AND ((Appointments.flgMarkDelete = 0) OR (Appointments.flgMarkDelete IS NULL)) ORDER BY " + str + ""

but now the doctor table is in Oracle database and the appointment table is in SQL database, how can I get the data from different databases? can I do that in one Command? or I should use 2 commands, one is sql command and the other is oracle command?

please help me, it is my first time to work with 2 databases in one system...

Regards,
Ninaright, one database per sql command. use 2 seperate ones and combine them after thatoh really :0 ..how can i do that?
 
Back
Top