Home » RDBMS Server » Server Administration » SQL and JOINS
SQL and JOINS [message #374447] |
Tue, 12 June 2001 15:03 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Van Kapeghian
Messages: 1 Registered: June 2001
|
Junior Member |
|
|
I'm trying to translate the following SQL statement into something oracle can understand:
any ideas?
Cheers,
-Van
SELECT ScheduleDetailsID, GMT_Offset, AttachmentSecurity,
Attachment1, Attachment2, Attachment3, RCN,
ContactFirstName, ContactLastName, CompanyOrDepartment,
PhoneNumber, EmailAddress, Schedule.ScheduleID,
ScheduleDetails.ConferenceNumber, ScheduleStartTime,
ScheduleStartTimeDate, ScheduleEndTime,
ScheduleEndTimeDate, DestinationName, MeetingTitle,
Area.AreaID, ScheduleDetails.ResourceID,
ScheduleDetails.CompanyName,
ScheduleDetails.Resource
FROM TimeZone INNER JOIN
Resources ON
TimeZone.TimeCode = Resources.TimeZone INNER JOIN
ScheduleDetails ON
Resources.ResourceID = ScheduleDetails.ResourceID INNER JOIN
Schedule ON
ScheduleDetails.ScheduleID = Schedule.ScheduleID INNER JOIN
Area ON Resources.AreaID = Area.AreaID LEFT OUTER JOIN
CustomersGSS ON
ScheduleDetails.CustomerID = CustomersGSS.CustomerID
WHERE ScheduleDetails.ScheduleDate = '2001-06-12' AND
Resources.ResourceID = '201' AND
ScheduleDetails.CompanyName = 'Public'
ORDER BY ScheduleDetails.ScheduleStartTime
|
|
|
Re: SQL and JOINS [message #374486 is a reply to message #374447] |
Thu, 14 June 2001 10:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kavithask
Messages: 34 Registered: March 2001 Location: London
|
Member |
|
|
Hi,
I dont think there is any tool or simple method of converting the SQL. I think it needs to be recoded for SQL Standards, which would then run against any database.
HTH
Kavitha
|
|
|
Re: SQL and JOINS [message #374491 is a reply to message #374447] |
Thu, 14 June 2001 16:44 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Lars Sjöström
Messages: 24 Registered: June 2001
|
Junior Member |
|
|
I'd say
SELECT ScheduleDetailsID, GMT_Offset, AttachmentSecurity,
Attachment1, Attachment2, Attachment3, RCN,
ContactFirstName, ContactLastName, CompanyOrDepartment,
PhoneNumber, EmailAddress, Schedule.ScheduleID,
ScheduleDetails.ConferenceNumber, ScheduleStartTime,
ScheduleStartTimeDate, ScheduleEndTime,
ScheduleEndTimeDate, DestinationName, MeetingTitle,
Area.AreaID, ScheduleDetails.ResourceID,
ScheduleDetails.CompanyName,
ScheduleDetails.Resource
FROM TimeZone,
Resources,
Shedule,
SheduleDetails,
CustomerCSS
WHERE
TimeZone.TimeCode = Resources.TimeZone AND
Resources.ResourceID = ScheduleDetails.ResourceID AND
ScheduleDetails.ScheduleID = Schedule.ScheduleID AND
Resources.AreaID = Area.AreaID AND ScheduleDetails.CustomerID (+)= CustomersGSS.CustomerID AND
ScheduleDetails.ScheduleDate = '2001-06-12' AND
Resources.ResourceID = '201' AND
ScheduleDetails.CompanyName = 'Public'
ORDER BY ScheduleDetails.ScheduleStartTime
would work, not sure about the (+)-sign.
|
|
|
Goto Forum:
Current Time: Wed Sep 11 18:05:04 CDT 2024
|