0

hi i am writing a report, it must have parameters ToDate and FromDate,now the thing is i did all that but it stllrespond with just headring no data. Please help what am i doing wrong

2
Contributors
3
Replies
8
Views
5 Years
Discussion Span
Last Post by lakhe
0
    declare @Fromdate varchar(10)
    declare @todate varchar(10)
    select names 
           sum qult
               case 
                   when sum(qult) = '0'
                   then sum(equiv)
                   else sum(num)
                 end
                else
                    case
                        when sum(qult) = '0'
                       then sum(equiv)
                       else sum(num)
                      end
                    end as 'actual'  
    from
        certaintable inner join
        thistable inner join
        anothertable

        WHERE (sDte IN (SELECT sDte FROM tableDate WHERE (YrNme = '2012'))) AND
    (UOM IN (SELECT UOM FROM tableMeasure WHERE (TypeLbl = ('PAL')))) AND
                (vTpe IN (SELECT vTpe FROM tableService WHERE (vCde IN ('jj', 'BB', 'CB','CE', 'C', 'Cg', 'kk')))) AND
    (Prod IN
            (SELECT Prod
                          FROM tableProduct
                                    WHERE ProdNme = 'chivken'
                                                                    AND VarNme = 'country'))


   {what i need is to put the 2 parameters @fromdate and @todate so that when a client chosse a date that client reciev info inbetween those dates} 
0

sorry it took me this long to say thank u , your code is exactly like mine its like we are working for the same company

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.