LesStockton
Programmer
What's wrong with the join in this stored procedure I'm trying to write?
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[udCount_OrdersNew]
@OrderOwnerCompany int
AS
SELECT
Count(OrderID) AS Count
FROM [T_Order O] JOIN [T_OrderStatus OS]
WHERE O.OwnerCompany = @OrderOwnerCompany
AND O.ReviewedInd = 0
AND OS.Description='New'
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[udCount_OrdersNew]
@OrderOwnerCompany int
AS
SELECT
Count(OrderID) AS Count
FROM [T_Order O] JOIN [T_OrderStatus OS]
WHERE O.OwnerCompany = @OrderOwnerCompany
AND O.ReviewedInd = 0
AND OS.Description='New'