0
-- =============================================
ALTER PROCEDURE [dbo].[NST_GetCboCurrencyAfterUpdate]
@AccCurrency nvarchar(3)='',
@AccSgroup nvarchar(6)= '',
@AccInternalCie int=null
AS
BEGIN
SET NOCOUNT ON;
IF @AccInternalCie is not null and @AccCurrency <> '' and @AccSgroup <> ''
Begin
SELECT * FROM TblAccounts Where
AccInternalCie = @AccInternalCie and AccCurrency = @AccCurrency and AccSgroup = @AccSgroup ORDER BY AccDescription
End
Else if @AccInternalCie is not null and @AccCurrency <> ''
Begin
SELECT * FROM TblAccounts Where
AccInternalCie = @AccInternalCie and AccCurrency = @AccCurrency ORDER BY AccDescription
END
Else if @AccInternalCie is not null and @AccSgroup <> ''
Begin
SELECT * FROM TblAccounts Where
AccInternalCie = @AccInternalCie and AccSgroup = @AccSgroup ORDER BY AccDescription
END
Else if @AccCurrency <> '' and @AccSgroup <> ''
Begin
SELECT * FROM TblAccounts Where
AccCurrency = @AccCurrency and AccSgroup = @AccSgroup ORDER BY AccDescription
END
Else if @AccSgroup <> ''
Begin
SELECT * FROM TblAccounts Where
AccSgroup = @AccSgroup
Print @AccSgroup
END
Else if @AccCurrency <> ''
Begin
SELECT * FROM TblAccounts Where
AccCurrency = @AccCurrency ORDER BY AccDescription
END
Else if @AccInternalCie is not null
Begin
SELECT * FROM TblAccounts Where
AccInternalCie = @AccInternalCie
END
end
我有以下存儲過程,我如何與正在如何執行特定查詢的SQL Server Management Studio中的調試測試如何測試一個查詢對一個存儲過程
Select * from TblAccounts where AccSGroup = '1000'
說,只有AccSGroup不等於「」,所以
Else if @AccSgroup <> ''
Begin
SELECT * FROM TblAccounts
Where AccSgroup = @AccSgroup
Print @AccSgroup
END
查詢應執行和休息必須繞過
如果你能幫我所有的排列和除了一個我已經發布關於它工作在SQL Server而不是在前端asp.net – vini
組合工作,那麼可能有一些問題與如何你從asp.net調用SP。你能在這裏粘貼這些代碼嗎? –
已添加DataAccessLayer代碼 – vini