I have an SP
That goes something like this
This works fine if I give it a kittype.
But I would like to use the same SP for my totals. So for every kittype. In essence when kittype IS NULL then ignore it and give everything.
Is this possible? yes.
How? I have no idea, can anybody help?
Christiaan Baes
Belgium
"In a system where you can define a factor as part of a third factor, you need another layer to check the main layer in case the second layer is not the base unit." - jrbarnett
That goes something like this
Code:
CREATE PROCEDURE [dbo].[spo_KitsGeneralStatistic]
(
@KitType varchar(36)
)
AS
SELECT
(
SELECT COUNT(*)
FROM [tbl_kit]
WHERE [kittype] = @kittype)
AS [UsedKits])
,(...
)
This works fine if I give it a kittype.
But I would like to use the same SP for my totals. So for every kittype. In essence when kittype IS NULL then ignore it and give everything.
Is this possible? yes.
How? I have no idea, can anybody help?
Christiaan Baes
Belgium
"In a system where you can define a factor as part of a third factor, you need another layer to check the main layer in case the second layer is not the base unit." - jrbarnett