Error on SQL server join
-
Hi All, I am trying to run this query on my database and I am getting an error Incorrect syntax near the keyword 'JOIN'. USE IVRCallCenterTest Go SELECT * FROM dbo.OutputPromptItem WHERE SegmentId=7198 JOIN dbo.OutputPrompt ON dbo.OutputPromptItem.PromptId=dbo.OutputPrompt.PromptID Go what is wrong with my code ? Thanks in advance
-
Hi All, I am trying to run this query on my database and I am getting an error Incorrect syntax near the keyword 'JOIN'. USE IVRCallCenterTest Go SELECT * FROM dbo.OutputPromptItem WHERE SegmentId=7198 JOIN dbo.OutputPrompt ON dbo.OutputPromptItem.PromptId=dbo.OutputPrompt.PromptID Go what is wrong with my code ? Thanks in advance
-
Hi All, I am trying to run this query on my database and I am getting an error Incorrect syntax near the keyword 'JOIN'. USE IVRCallCenterTest Go SELECT * FROM dbo.OutputPromptItem WHERE SegmentId=7198 JOIN dbo.OutputPrompt ON dbo.OutputPromptItem.PromptId=dbo.OutputPrompt.PromptID Go what is wrong with my code ? Thanks in advance
Hello The [WHERE] filter is in the wrong place. Try this (see the [WHERE] location?):
SELECT *
FROM dbo.OutputPromptItem
JOIN dbo.OutputPrompt
ON dbo.OutputPromptItem.PromptId=dbo.OutputPrompt.PromptID
WHERE SegmentId=7198 -
Hi All, I am trying to run this query on my database and I am getting an error Incorrect syntax near the keyword 'JOIN'. USE IVRCallCenterTest Go SELECT * FROM dbo.OutputPromptItem WHERE SegmentId=7198 JOIN dbo.OutputPrompt ON dbo.OutputPromptItem.PromptId=dbo.OutputPrompt.PromptID Go what is wrong with my code ? Thanks in advance
You should use Where Clause at End of Statement Like
SELECT *
FROM dbo.OutputPromptItem
JOIN dbo.OutputPrompt
ON dbo.OutputPromptItem.PromptId=dbo.OutputPrompt.Promp WHERE SegmentId=7198