Infomaker multi select

Former Member
Former Member $organization

Actually I just discovered that the multiple selection does not work in the SQL either, so I must have something wrong in the statement.  Here is the coding I am using:

 

@import_date_start datetime,

@import_date_end datetime,

@COF_level_str varchar(255)

 

 

as

 

Select c.lname, c.fname, f.customer_no, f.COF_level, f.Cont_amt,

      f.Fiscal_Quarter, f.Import_Date

from LT_MCFTA_COF f

Inner JOIN T_Customer c ON c.customer_no = f.customer_no

 

Where f.import_date between @import_date_start and @import_date_end

and charindex(',' + convert(varchar, COF_level) + ',' , ',' + @COF_level_str + ',') > 0

 

Order by f.customer_no

 

The problem is with the COF_Level multi select.

 

 

Penny Tabor

IT Manager

Midland Center for the Arts

Midland, MI 48640    

                                     Description: Comptia                                              

 

 

 

Parents
  • Hi Penny,

    I see from your other post that this is a question of how to handle a multi-select parameter when the items being selected are strings rather than numbers.  If the problem is that InfoMaker is adding in double quotes around each item you could simply have SQL remove those double quotes with a Replace statement.

    Try adding this before the Select statement in your procedure.

    set @COF_level_str = replace(@COF_level_str,'"','')

    It isn't the most snazzy of solutions, but I think it will work.

    Jared

    * The copy and paste isn't easy to read in the coding above.  Here is another interpretation.

    Replace(@COF_level_str,<singlequote><doublequote><singleqoute>,<singlequote><singlequote>)

Reply
  • Hi Penny,

    I see from your other post that this is a question of how to handle a multi-select parameter when the items being selected are strings rather than numbers.  If the problem is that InfoMaker is adding in double quotes around each item you could simply have SQL remove those double quotes with a Replace statement.

    Try adding this before the Select statement in your procedure.

    set @COF_level_str = replace(@COF_level_str,'"','')

    It isn't the most snazzy of solutions, but I think it will work.

    Jared

    * The copy and paste isn't easy to read in the coding above.  Here is another interpretation.

    Replace(@COF_level_str,<singlequote><doublequote><singleqoute>,<singlequote><singlequote>)

Children
No Data