A
Antney
Can anyone help me with this? I keep getting a "(missing operator)" error and
when I do try and add parentheses, I get a "JOIN" error on the first "ON"
instance. All of this is happening in the FROM portion of the query.
If anyone could help, I would appreciate it.
Thanks,
Antney
Here's the code:
SELECT TOP 100 PERCENT dbo_MST_0001.SE AS [Section], dbo_MST_0001.PD AS
Period, dbo_MST_0001.SM AS Semester, dbo_MST_0001.CN AS CourseID,
dbo_CRS_0001.CO AS Course, dbo_CRS_0001.C3 AS CrsCBEDSCode, dbo_MST_0001.TN
AS TchrNum, dbo_STU_0001.SC AS SchoolNum, dbo_STU_0001.LN AS StudentLast,
dbo_STU_0001.FN AS StudentFirst, dbo_STU_0001.ID AS StudentID,
dbo_STU_0001.SX AS Gender, dbo_STU_0001.GR AS Grade, CONVERT(varchar,
dbo_STU_0001.BD, 101) AS Birthdate, dbo_STU_0001.EC AS Ethnicity,
dbo_MST_0001.PR AS Program, dbo_TCH_0001.TN AS TeacherID, dbo_TCH_0001.TF AS
TchrFirst, dbo_TCH_0001.TLN AS TchrLast, dbo_STU_0001.TG AS LeaveStatus,
dbo_STU_0001.SN AS StudentNumOLD
INTO dbo.vwStudentSchedule_0001
FROM dbo_STU_0001 INNER JOIN dbo_SEC_0001 ON dbo_STU_0001.SC =
dbo_SEC_0001.SC AND dbo_STU_0001.SN = dbo_SEC_0001.SN INNER JOIN
dbo_MST_0001 ON dbo_SEC_0001.SE = dbo_MST_0001.SE AND dbo_SEC_0001.SC =
dbo_MST_0001.SC INNER JOIN dbo_CRS_0001 ON dbo_MST_0001.CN = dbo_CRS_0001.CN
INNER JOIN dbo_TCH_0001 ON dbo_MST_0001.SC =
dbo_TCH_0001.SC AND dbo_MST_0001.TN = dbo_TCH_0001.TN INNER JOIN
dbo_LOC_0001 ON dbo_STU_0001.SC = dbo_LOC_0001.CD
WHERE (dbo_MST_0001.DEL = 0) AND (dbo_CRS_0001.DEL = 0) AND
(dbo_STU_0001.DEL = 0) AND (dbo_TCH_0001.DEL = 0) AND (dbo_SEC_0001.DEL = 0)
AND (dbo_STU_0001.TG = '')
ORDER BY dbo_STU_0001.LN, dbo_STU_0001.FN;
when I do try and add parentheses, I get a "JOIN" error on the first "ON"
instance. All of this is happening in the FROM portion of the query.
If anyone could help, I would appreciate it.
Thanks,
Antney
Here's the code:
SELECT TOP 100 PERCENT dbo_MST_0001.SE AS [Section], dbo_MST_0001.PD AS
Period, dbo_MST_0001.SM AS Semester, dbo_MST_0001.CN AS CourseID,
dbo_CRS_0001.CO AS Course, dbo_CRS_0001.C3 AS CrsCBEDSCode, dbo_MST_0001.TN
AS TchrNum, dbo_STU_0001.SC AS SchoolNum, dbo_STU_0001.LN AS StudentLast,
dbo_STU_0001.FN AS StudentFirst, dbo_STU_0001.ID AS StudentID,
dbo_STU_0001.SX AS Gender, dbo_STU_0001.GR AS Grade, CONVERT(varchar,
dbo_STU_0001.BD, 101) AS Birthdate, dbo_STU_0001.EC AS Ethnicity,
dbo_MST_0001.PR AS Program, dbo_TCH_0001.TN AS TeacherID, dbo_TCH_0001.TF AS
TchrFirst, dbo_TCH_0001.TLN AS TchrLast, dbo_STU_0001.TG AS LeaveStatus,
dbo_STU_0001.SN AS StudentNumOLD
INTO dbo.vwStudentSchedule_0001
FROM dbo_STU_0001 INNER JOIN dbo_SEC_0001 ON dbo_STU_0001.SC =
dbo_SEC_0001.SC AND dbo_STU_0001.SN = dbo_SEC_0001.SN INNER JOIN
dbo_MST_0001 ON dbo_SEC_0001.SE = dbo_MST_0001.SE AND dbo_SEC_0001.SC =
dbo_MST_0001.SC INNER JOIN dbo_CRS_0001 ON dbo_MST_0001.CN = dbo_CRS_0001.CN
INNER JOIN dbo_TCH_0001 ON dbo_MST_0001.SC =
dbo_TCH_0001.SC AND dbo_MST_0001.TN = dbo_TCH_0001.TN INNER JOIN
dbo_LOC_0001 ON dbo_STU_0001.SC = dbo_LOC_0001.CD
WHERE (dbo_MST_0001.DEL = 0) AND (dbo_CRS_0001.DEL = 0) AND
(dbo_STU_0001.DEL = 0) AND (dbo_TCH_0001.DEL = 0) AND (dbo_SEC_0001.DEL = 0)
AND (dbo_STU_0001.TG = '')
ORDER BY dbo_STU_0001.LN, dbo_STU_0001.FN;