locked
Oledb provider and ? parameters cause error -313 sqlstate=07001 in db2 from ssrs 2008 RRS feed

  • Question

  • I'm using the following query versus db2

    SELECT

     

    t .FIMPTOT, (CASE WHEN (t .Pct_To_Total > 0) AND (t .Pct_To_Total < 1) THEN 1 ELSE INTEGER(t .Pct_To_Total) END) Percentage

    FROM

     

    (SELECT FIMPTOT, SUM(NUMRIP) NUMRIP, double(COUNT(NUMRIP)) * 100 /

    (

    SELECT COUNT(NUMRIP)

     

    FROM DB2DA.TAB1INDI

     

    WHERE FIMPTOT > '0' AND ANNORIFE = ? AND SIGPRO =? AND CODCOM = ? AND CSC BETWEEN ? AND ? ) Pct_To_Total

     

    FROM DB2DA.TAB1INDI

     

    WHERE FIMPTOT > '0' AND ANNORIFE = ? AND SIGPRO =? AND CODCOM = ? AND CSC BETWEEN ? AND ?

     

    GROUP BY FIMPTOT) t

    in a dataset.

    When i run this query i get the following error in ssrs 2008:

    microsoft ole db provider ,the number of host variables specified is not equal to the number of

    parameters markers.

    error -313 and sqlstate 07001 in db2

    Can you help me?

     

    Friday, August 6, 2010 7:01 AM

Answers