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                                              

 

 

 

  • 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>)

  • Former Member
    Former Member $organization

    Great – I will try that..thanks so much!!!!

     

    Penny

     

    From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Jared Mollenkopf
    Sent: Thursday, May 31, 2012 11:35 AM
    To: Tabor, Penny
    Subject: Re: [Tessitura Technical Forum] Infomaker multi select

     

    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>)

    From: Penny Tabor <bounce-pennytabor2237@tessituranetwork.com>
    Sent: 5/30/2012 2:23:43 PM

    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                                              

     

     

     




    This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!