Have a couple questions here, can I set a list of values for a parameter in a command???
I have a sql command as follows...
(SELECT M.Received, Count(M.Number) AS ActiveAccts, SUM(M.Current1) AS ActiveAmt, c.company, c.cob, c.customer
FROM dbo.Master M (NOLOCK)
INNER JOIN dbo.Customer C (NOLOCK)
ON M.Customer = C.Customer
INNER JOIN dbo.Status S (NOLOCK)
ON M.Status = S.Code
WHERE
(C.Company = '{?Company Name}'
or ('{?Customer}' = 'All' or C.Customer = '{?Customer}'))
AND C.COB = '{?COB}'
AND S.StatusType <> '1 - CLOSED'
GROUP BY M.Received)
It is not working, it is not returning anything regardless of what I put into the prompts, what I want to be able to do is type in the COB AND EITHER the Co Name OR Customer but not both. Is all even a required part to accomplish this???
I have a sql command as follows...
(SELECT M.Received, Count(M.Number) AS ActiveAccts, SUM(M.Current1) AS ActiveAmt, c.company, c.cob, c.customer
FROM dbo.Master M (NOLOCK)
INNER JOIN dbo.Customer C (NOLOCK)
ON M.Customer = C.Customer
INNER JOIN dbo.Status S (NOLOCK)
ON M.Status = S.Code
WHERE
(C.Company = '{?Company Name}'
or ('{?Customer}' = 'All' or C.Customer = '{?Customer}'))
AND C.COB = '{?COB}'
AND S.StatusType <> '1 - CLOSED'
GROUP BY M.Received)
It is not working, it is not returning anything regardless of what I put into the prompts, what I want to be able to do is type in the COB AND EITHER the Co Name OR Customer but not both. Is all even a required part to accomplish this???