
September 21st, 2005, 03:35 AM
|
|
Contributing User
|
|
Join Date: May 2005
Location: @Home :D
Posts: 50
Time spent in forums: 3 h 50 m 31 sec
Reputation Power: 0
|
|
Retrieving data from 2 different databases
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,
Nina
|