Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Parameter not working in SSRS

Author  Topic 

AdamWest
Constraint Violating Yak Guru

360 Posts

Posted - 2009-07-10 : 11:39:00
@StartDate is used in SSRS but it is not currently doing this filter at all. Any thoughts as to why?

DECLARE @StartDate NVARCHAR(15)
SELECT
IV00101.ITMGEDSC,
IV00101.ITEMDESC,
RM00101.CUSTNAME,
RM00101.CPRCSTNM,
IV40600.UserCatLongDescr,
CATS.UserCatLongDescr,
SOP10200.ITEMNMBR,
SOP10200.SOPNUMBE,
SOP10200.QUANTITY,
SOP10200.OXTNDPRC,
SOP10200.SOPTYPE,
SOP10100.DOCDATE,
'Current' as source


FROM ((((PBS.dbo.SOP10200
SOP10200 INNER JOIN PBS.dbo.IV00101 IV00101 ON
SOP10200.ITEMNMBR=IV00101.ITEMNMBR)

INNER JOIN
PBS.dbo.SOP10100 SOP10100 ON
(SOP10200.SOPTYPE=SOP10100.SOPTYPE) AND
(SOP10200.SOPNUMBE=SOP10100.SOPNUMBE))

INNER JOIN
PBS.dbo.IV40600 IV40600 ON
IV00101.ITMGEDSC=IV40600.USCATVAL)

INNER JOIN
PBS.dbo.IV40600 CATS ON
IV00101.USCATVLS_2=CATS.USCATVAL)

INNER JOIN
PBS.dbo.RM00101 RM00101 ON
SOP10100.CUSTNMBR=RM00101.CUSTNMBR

where SOP10100.DOCDATE >= @StartDate

UNION ALL

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-10 : 13:11:25
why do you think its not filetring? did you try executing the first select alone without union all part?
Go to Top of Page

AdamWest
Constraint Violating Yak Guru

360 Posts

Posted - 2009-07-10 : 13:58:32
yes it is not working with the first part only as well
Go to Top of Page
   

- Advertisement -