Client Management Suite

 View Only
  • 1.  1 simple drop down list

    Posted Sep 26, 2012 10:44 AM

    Ok so im not sure what im missing.. searched up here for 45 minutes so figured id post...

    I have been able to create sql reports with using parameters and they worked...

    so I took that a bit farther.. I took the following SQL Code found up here..

     

    SELECT t1.[ItemName], t1.[DeletedDate] as 'Deleted Date', t2.[User]  
    FROM itemdeleted t1 JOIN 
    evt_ns_item_management t2 on t2.itemguid = t1.itemguid  
    WHERE t2.[Action] = 'Delete' 
    AND t2.resourcetypeguid =  '493435F7-3B17-4C4C-B07F-C23E7AB7781F' 
    order by t1.[DeletedDate] desc
     
    and made the where statement...
          WHERE t2.[Action] = '%strItemStatus%' 
     
    added the report parameter strItemStatus
     
    Query parameter added
     
    and I get no results
    now if I put Delete or any other status back in teh where statement to get rid of the parameter it works.. so not sure what i am missing. this is my first drop down list..
     
    thanks
     


  • 2.  RE: 1 simple drop down list

    Posted Sep 28, 2012 12:05 AM

    I seem to have the same problem.

    The % sign for All is somehow treated as a literal and not the SQL wildcard. This means that your resolved query looks like

    WHERE t2.[Action] = '%'

    when in fact (thinking about it now), it should actually use the LIKE command and not the = sign.

    WHERE t2.[Action] LIKE '%'

    I'd have to go & try that myself.



  • 3.  RE: 1 simple drop down list
    Best Answer

    Posted Oct 01, 2012 12:14 AM

    I've not used the console to test this (pain fully slow)

    but using SQL Management Studio, I get the expected results with LIKE instead of using the equal sign.



  • 4.  RE: 1 simple drop down list

    Posted Oct 01, 2012 10:42 AM

    Thank you Ian... second set of eyes is greatly appreciated...

    i was using the = as I was specifying ALL of it.. in the dropdown.. didnt think of trying the like..

    Thanks!