I'm getting an error:
MSG 4145: An expression of non-boolean type specified in a context where a condition is expected, near 'Left'.
Thoughts?
USE [DatabaseName]
GO
/****** Object: StoredProcedure [dbo].[spFilePlanNavigate] Script Date: 03/19/2015 14:54:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[spFilePlanNavigate](@CategoryId int)
As
Set NoCount On
Begin
If @CategoryId > 0
Select FilePlan.*, Retention.Retention_Type, Retention.Retn_Description1
From FilePlan, Retention
Where FilePlan.Retention_Code Left Outer Join Retention.Retention_Code
And FilePlan.Category_Id = @CategoryId
Else
Select FilePlan.*, Retention.Retention_Type, Retention.Retn_Description1
From FilePlan, Retention
Where FilePlan.Retention_Code Left Outer Join Retention.Retention_Code
And FilePlan.Category_Id_Parent = @CategoryId
End