The Spotfire Community is moving to TIBCOmmunity and this forum location has closed. During the transition, you can still search the old forums but posting has been disabled. We encourage you to pick up the discussion at the new Spotfire community on TIBCOmmunity.
Multiple Input Parameters in Spotfire IL for SQL Stored Proc - TIBCO Spotfire Community

Multiple Input Parameters in Spotfire IL for SQL Stored Proc

Last post Fri, Aug 19 2011 3:17 PM by lbeard. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • Fri, Aug 19 2011 3:17 PM

    • lbeard
    • Not Ranked
    • Joined on Fri, Aug 19 2011
    • Posts 2

    Multiple Input Parameters in Spotfire IL for SQL Stored Proc

    I have a SQL Stored Procedure below which takes as an input a list of compounds. In SQL I can run the following command and get info for a list of cmpds using this query:

    EXEC getCmpdInfo 'cmpd1,cmpd2'

    I intended to use it in Spotfire by having the procedure prompt me to enter values. When the IL opens, I would choose "get values" and I select a column in my analysis to use as as a source of the list of compounds. Spotfire then automatically loads the list of compounds (one compound per line). However, when the IL returns, I only get info for the top compound.

    If I manually enter the compounds by separating the names with a comma, I can get the IL to return info for multiple values. However, this is not the default way that Spotfire loads the list of compounds.

    How does Spotfire convert the list of compounds (one compound per line) to a SQL query? How should I modify my steps to be able to use the multiple input functionality in Spotfire to match the input array for my SQL stored procedure? Would this question be appropriate for support? I would really appreciate any help.

    Thank you

    SET QUOTED_IDENTIFIER OFF GO ALTER PROCEDURE [dbo].[getCmpdInfo] @CmpdIDs Varchar(500) AS DECLARE @SQL Varchar(2000) set @CmpdIDs = "'" + replace(@CmpdIDs,',',"','") + "'" Select @SQL = 'SELECT * FROM Cmpds ' Select @SQL = @SQL + 'WHERE CmpdID IN (' + @CmpdIDs + ') ' Select @SQL = @SQL + 'AND Quantity > 0' Exec( @SQL) GO
Page 1 of 1 (1 items)
©Copyright 2000-2011 TIBCO Software Inc | Privacy Policy | Terms of Use I Blog I Contact Us I Content Center