Tsql stored procedure - passing multiple variables

Hi,
I have a dropdown field on a form that allows for multiple
selects. When I process the form, I currently use CF to dynamically
generate the sql WHERE clause creating as many AND statements as
needed.
I'm migrating to MS SQL 2005 and Stored Procedures on the db.
I'm trying to create a stored procedure that effectively uses tsql
to do what CF was doing previously (creating the WHERE clause).
In the code below, I am passing a char(22) variable called
Channel. The code below was my initial attempt at trying to create
the WHERE clause. Most of the code is focused on extracting out the
individual "Channel" entities. Any thoughts on how to pull this
together would be GREATLY appreciated!
I'm need help on the SELECT side, ultimately I'm selecting
"regions", from "Syndicated", the WHERE is based on the "Channels"
passed.
Thanks,
cfwild

Hi,
This was quite the adventure trying to figure this out. I
learned quite a bit about tsql. Here is the final procedure:
CREATE PROCEDURE dbo.uspSelectSyndicatedRegion
@TablePrefix char(7),
@Category varchar(100),
@Channel varchar(2000)
AS
BEGIN
SELECT DISTINCT S.Region
FROM Syndicated S
JOIN iter_charlist_to_tbl(@Channel, DEFAULT) M
ON S.Channel = M.str
UNION
SELECT ''
ORDER BY S.Region
END

Similar Messages

  • How to call stored procedure with multiple parameters in an HTML expression

    Hi, Guys:
    Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
    The orginal HTML expression is :
    <img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
    procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
    Thanks a lot.
    Sam

    Hi:
    Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
    <img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
    create or replace
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
        v_mime_type VARCHAR2(48);
        v_length NUMBER;
        v_name VARCHAR2(2000);
        v_image BLOB;
        v_counter number:=0;
        cursor cur_All_Images_of_Offender is
          SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
          FROM sor_image
          WHERE offender_id = p_n_Offender_id;
        rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
    BEGIN
        open cur_All_Images_of_Offender;
        loop
          fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
          v_counter:=v_counter+1;
          if (v_counter=p_n_image_Count) then
            owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
            htp.p('Content-length: '||rec_Image_of_Offender.image_length);
            owa_util.http_header_close;
            wpg_docload.download_file (rec_Image_of_Offender.image);
          end if;
          exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
        end loop;
        close cur_All_Images_of_Offender;
    END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
    Thanks
    Sam

  • Executing a stored procedure containing multiple Select statements

    Post Author: Beverly
    CA Forum: General
    I am using Crystal  10.0 against a MS SQL 2000 server.
    I am trying to create a report based on a stored procedure that contains multiple select statements.  The sp requires a single parameter (Claim number) and contains 17 Select statements that produce results.
    I am able to use the Add command and execute the sp with the parameter, but I am only getting the results of the first select statement in the sp back in my data set.  Is there a way to have the data from each Select statement returned to my report?
    I have used Crystal for a while, but pretty much for straight-forward reporting.  I am familiar with the basics of SQL.
    I would appreciate any help anyone can offer.
    Thanks.

    Post Author: BISoftware
    CA Forum: General
    I believe Crystal Reports can only handle one recordset at a time, which means it can only handle a single select statement.  The only way I can see around this would be to break up your stored procedure into multiple stored procedures, so that each only contains a single select statement.  Then, use subreports to report on each individual sp. Hope this helps. - Davewww.BusinessSoftwareResource.com

  • Stored procedure returning multiple records without using SYS_REFCURSOR

    Hello,
    I am new to oracle stored procedures, have done stored procs in SQL server in past. I am trying to write single stored proc which will return multiple records. I have the stored proc as below and that is compiled without any errors.
    We don't want to use SYS_REFCURSOR as output param b'coz the place from which this proc is gonna call, that system doesn't support SYS_REFCURSOR param.
    create or replace
    PROCEDURE p_get5500DATA_MB (
    IN_plan_ID IN T_5500DATA_QWP.Plan_ID%TYPE,
    IN_plan_ID_col OUT T_5500DATA_QWP.Plan_ID%TYPE,
    p_SEQNUM OUT T_5500DATA_QWP.SEQNUM%TYPE,
    p_HEADER_CD OUT T_5500DATA_QWP.HEADER_CD%TYPE,
    p_VALUE1 OUT T_5500DATA_QWP.VALUE1%TYPE,
    p_VALUE2 OUT T_5500DATA_QWP.VALUE2%TYPE
    ) AS
    BEGIN
    SELECT
    Plan_ID,
    SEQNUM,
    HEADER_CD,
    VALUE1,
    VALUE2
    INTO
    IN_plan_ID_col,
    p_SEQNUM,
    p_HEADER_CD,
    p_VALUE1,
    p_VALUE2
    FROM TRS1DBO.T_5500DATA_QWP
    WHERE Plan_ID = IN_plan_ID
    ORDER BY SeqNum;
    -- EXCEPTION
    -- WHEN OTHERS THEN
    -- RAISE_APPLICATION_ERROR(-210001, 'Error in fetching data from T_5500DATA_QWP....');
    END;
    Error:
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "TRS1DBO.P_GET5500DATA_MB", line 10
    ORA-06512: at line 11
    My questions is:
    - What would be the best practice for this type of simple stored procedures?
    - Is there any alternate or is there anything i can fix in above stored proc which return multiple records?
    Thank you,
    Vimal

    Just out of curiosity, what are you using for API or driver that doesn't support a ref cursor? Ref cursors are pretty much the defacto standard for passing multiple records out of an Oracle procedure. Oracle's ODP.NET, OLEDB, ODBC, JDBC, OCI, all support ref cursors. Chances are that if the driver you're using doesn't support something as basic/fundamental as a ref cursor, it's probably also not going to support something else either.
    You'll most likely want to check with the driver/api vendor on their recommended approach.

  • Stored Procedure With Multiple Result Sets As Report Source : Crosspost

    Hello Everyone,
    I have an issue where i have created a stored procedure that returns multiple result sets
    /* Input param = @SalesOrderID */
    SELECT * FROM Orders TB1
      INNER JOIN OrderDetails TB2 ON  TB1.ID = TB2.ID
    WHERE TB1.OrderID = @SalesOrderID
    SELECT * FROM Addresses
      WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Shipping'
    SELECT * FROM Addresses
      WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Billing'
    This is just a quick sample, the actual procedure is a lot more complex but this illustrates the theory.
    When I set the report source in Crystal X to the stored procedure it is only allowing me to add rows from the first result set.
    Is there any way to get around this issue?
    The reason that I would prefer to use a stored procedure to get all the data is simply performance. Without using one big stored procedure I would have to run at least 6 sub reports which is not acceptable because the number of sub reports could grow exponentially depending on the number of items for a particular sales order.
    Any ideas or input would be greatly appreciated.
    TIA
        - Adam
    P.S
    Sorry for the cross post, I originally posted this question [here|/community [original link is broken];
    but was informed that it might be the wrong forum
    Edited by: Adam Harris on Jul 30, 2008 9:44 PM

    Adam, apologies for the redirect, but it is better to have .NET posts in one place. That way anyone can search the forum for answers. (and I do not have the rights to move posts).
    Anyhow, as long as the report is created, you should be able to pass the datasets as:
    crReportDocument.Database.Tables(0).SetDataSource(dataSet.Tables("NAME_OF_TABLE"))
    Of course alternatively, (not sure if this is possible in your environment) you could create a multi-table ADO .NET dataset and pass that to the report.
    Ludek

  • Tsql stored procedure bulk insert

    Hi,
    The following code works perfectly:
    cfquery datasource="#SESSION.DSN#">
      BULK INSERT dbo.Syndicated
      FROM '#selectedfile#'
      WITH
       FIELDTERMINATOR = ',',
       ROWTERMINATOR = '\n',
       FIRSTROW = 2
    </cfquery>
    I created this stored procedure:
    CREATE
    PROCEDURE dbo.uspInsertSyndicatedRecords@selectedfile
    varchar(2000)
    AS
    BEGIN  
    BULK INSERT Syndicated 
    FROM '@selectedfile'
    WITH
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n',
    FIRSTROW = 2 
    END
    I'm getting an error:  The file "@selectedfile" does not exist.
    Anyone know if there are issues with the file path in a stored procedure.  #selectedfile# = C:\ColdFusion8\wwwroot\cfdocs\mis35\luxury.csv
    Thanks!
    cfwild

    Unfortunately, dynamic queries don't work within TSQL - meaning you can't substibute table and column names with variables.  You can only use variables for the comparison values or select values.
    However, you can create a variable, build the SQL statement in that variable and execute it:
    DECLARE @SQLString VARCHAR(max)
    SET @SQLString = 'SQL Start ....' + @MyVar + ' .... SQLEnd'
    EXEC(@SQLString)
    Now, if the variable being concatinated is not a string, you will need to cast/convert it to string, which just adds tons of fun to the equation.
    Hope this helps!

  • Executing a Stored Procedure with OUT Variables

    When you execute a stored proc withi OUT variables, do you have to add in the "Declare" section and "Begin/End" sections? Or can you just use "EXECUTE <stored proc>"??

    When you execute a stored proc withi OUT variables, do you have to add in the "Declare" section and "Begin/End" sections?
    Or can you just use "EXECUTE <stored proc>"?? You mean this?:
    michaels>  create or replace procedure p (o out varchar2)
    as
    begin
       o := 'Some out variable';
    end p;
    Procedure created.
    michaels>  var o varchar2(50)
    michaels>  exec p(:o)
    PL/SQL procedure successfully completed.
    michaels>  print o
    o                                                
    Some out variable                                

  • Stored procedure with multiple Reference Cursors

    In Sybase and SQLServer, result sets are returned to the application implicitly. Oracle emulates this by passing back weak reference cursors to the application through an IN OUT parameter.The number of reference cursors must match the number of results sets. For example, if 2 select statements are present in the stored procedure code, then 2 reference cursors are passed back.The Oracle Migration Workbench creates the correct number of reference cursors but assigns each select statement results to the first cursor created. Therefore only the last set of results are returned to the client.
    Before (SQLServer)
    CREATE PROCEDURE get_sch_associated_appointment_info (@piAcc_itn int) AS SELECT s.acc_itn, r.internal_key, r.mnemonic, r.descp, sh.start_dtime, sh.end_dtime FROM schdtl s, schdtlhdr sh, resource r WHERE s.acc_itn = @piAcc_itn and sh.acc_itn = @piAcc_itn and sh.resource_itn = r.internal_key SELECT sdcr.acc_itn, sdcr.rsch_dtime, sdcr.rsch_by_init, sdcr.rsch_code, sdcr.rsch_reason, sdcr.cncl_dtime, sdcr.cncl_by_init, sdcr.cncl_code, sdcr.cncl_reason, sdcr.prev_start_dtime, sdcr.prev_by_init FROM schdtl_canrsch sdcr WHERE sdcr.acc_itn = @piAcc_itn SELECT sdi.acc_itn, i.sched_notes, i.post_sched_notes, d.pre_sch_notes, d.post_sch_notes, i.detail_key, i.output_notes FROM schdtl_info sdi, extitem i, dept d WHERE sdi.acc_itn = @piAcc_itn and sdi.actual_dept = i.dept and sdi.actual_proc_no = i.proc_no and sdi.actual_dept = d.dept
    After (Migration Workbench) – Optional Section
    CREATE OR REPLACE PROCEDURE get_sch_associated_appointment_info (piAcc_itn int, RC1 IN OUT Omwb_emulation.globalPkg.RCT1) AS OPEN RC1 SELECT s.acc_itn, r.internal_key, r.mnemonic, r.descp, sh.start_dtime, sh.end_dtime FROM schdtl s, schdtlhdr sh, resource r WHERE s.acc_itn = piAcc_itn and sh.acc_itn = piAcc_itn and sh.resource_itn = r.internal_key; OPEN RC1 SELECT sdcr.acc_itn, sdcr.rsch_dtime, sdcr.rsch_by_init, sdcr.rsch_code, sdcr.rsch_reason, sdcr.cncl_dtime, sdcr.cncl_by_init, sdcr.cncl_code, sdcr.cncl_reason, sdcr.prev_start_dtime, sdcr.prev_by_init FROM schdtl_canrsch sdcr WHERE sdcr.acc_itn = piAcc_itn; OPEN RC1 SELECT sdi.acc_itn, i.sched_notes, i.post_sched_notes, d.pre_sch_notes, d.post_sch_notes, i.detail_key, i.output_notes FROM schdtl_info sdi, extitem i, dept d WHERE sdi.acc_itn = piAcc_itn and sdi.actual_dept = i.dept and sdi.actual_proc_no = i.proc_no and sdi.actual_dept = d.dept;
    After (Manual Change)
    CREATE OR REPLACE PROCEDURE get_sch_associated_appointment_info (piAcc_itn int, RC1 IN OUT Omwb_emulation.globalPkg.RCT1, RC2 IN OUT Omwb_emulation.globalPkg.RCT1, RC3 IN OUT Omwb_emulation.globalPkg.RCT1) AS OPEN RC1 SELECT s.acc_itn, r.internal_key, r.mnemonic, r.descp, sh.start_dtime, sh.end_dtime FROM schdtl s, schdtlhdr sh, resource r WHERE s.acc_itn = piAcc_itn and sh.acc_itn = piAcc_itn and sh.resource_itn = r.internal_key; OPEN RC2 SELECT sdcr.acc_itn, sdcr.rsch_dtime, sdcr.rsch_by_init, sdcr.rsch_code, sdcr.rsch_reason, sdcr.cncl_dtime, sdcr.cncl_by_init, sdcr.cncl_code, sdcr.cncl_reason, sdcr.prev_start_dtime, sdcr.prev_by_init FROM schdtl_canrsch sdcr WHERE sdcr.acc_itn = piAcc_itn; OPEN RC3 SELECT sdi.acc_itn, i.sched_notes, i.post_sched_notes, d.pre_sch_notes, d.post_sch_notes, i.detail_key, i.output_notes FROM schdtl_info sdi, extitem i, dept d WHERE sdi.acc_itn = piAcc_itn and sdi.actual_dept = i.dept and sdi.actual_proc_no = i.proc_no and sdi.actual_dept = d.dept;

    I believe you are using .NET(?). If that is the case, please post this query to the .NET Development - Crystal Reports  forum:
    SAP Crystal Reports, version for Visual Studio
    That forum is monitored by qualified technicians and you will get a faster response there.
    Thank you for your understanding,
    Ludek

  • Get System Stored Procedure Data in variables

    Hello all Forum Members,
    I am new to SQL Server.
    My Requirement is that i want to get sp_helpuser procedure data in select query variables.
    is it Possible?
    Please Help.

    Hi Prashanth,
    It works  as per my requirement.
    But, Can it be achieved without creating table type variable i.e by creating simple variables ?
    Thanks very much for the reply.
    its possible to get stored procedure resultset using a select as per method 2 below
    http://sqlblogcasts.com/blogs/madhivanan/archive/2007/11/26/select-columns-from-exec-procedure-name-is-this-possible.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Stored Procedure Returning Multiple Rows

    Hello. Where can I find sample code from a class that calls a stored procedure that returns multiple rows?
    I have a servlet that calls the DB directly from the servlet & loops through the result set. I want to put that code into a stored procedure, but I'm not sure how to loop through the results.
    Your help is greatly appreciated!

    Surely you would call the stored procedure and loop
    through the resultset as usual.
    all that is different is the method by which you obtain the resultSet .
    assuming CallableStatement, Connection have been
    instantiated.
    cstmt=con.prepareCall("{call sp_NewOfficeSurgery (?,?)}");
    cstmt.setString(1,"first");
    cstmt.setString(2,"second");
    rs = cstmt.executeQuery();
    while (rs.next())
    String nme = rs.getString(1)
    etc,etc
    Hope this helps , Sorry If I have misinterpreted this
    please let me know if my thinking is floored or you need
    further clarification ect.
    [email protected]

  • Calling Stored Procedure for Multiple records

    Hi,
    I have an use case where I have more than 2000 item and for every item I need to fetch around 70 more values as out parameters. Also i need to show all thoes values on UI.
    So calling SP in loop is a problem as I can see the rendering the values and it's very slow.
    Can anyone suggest better way to handle this case?
    -Ajit

    Hi...
    I don't know about the function you have written but...
    Procedure will be created like following
    Take an example: i want to create a procedure to take only first letter from the city of City column.
    For this...
    1). Create a physical table manually under the schema folder.
    2). Give the name and select Table Type as "Stored Proc".
    3). In "Default Initialization String" field, you should write the query saying "select substr(city,1,1) as Col1 from Regions". In query Col1 is the alias name i have given for the new column. (Click OK)
    4). So, now this column should be part of the table newly created. So create a physical column under this newly created table with "Col1" name.
    5). Double-click the column and specify the data type of that particular column. (This should be done otherwise you can't move it to BMM layer)
    6). Now you can add this table to BMM layer by performing necessary joins w/o any errors or warnings. (This would be depending on your business requirement, for this some times you need to add keys also to the procedure to perform the joins and all)
    7). By adding it to the presentation layer, in answers you can watch the results..
    NOTE:
    1). While writing the function names in Stored procedures, DB you are using is important. Because, functions will vary between the DB's.
    2). Column name of newly created should match with the name you specified in the procedure as alias.
    3). If you are retrieving 'n' no. of columns from the procedure then you need to create 'n' no. of columns manually.
    4). For physical columns created manually, you need to specify the data type according to the type of data it's retrieving.
    It may helpful to you in achieving your requirement. If not sorry... but i am sure it's helpful to you...
    mark as helpful if it's helpful else mark as correct if correct ;)
    Thanks & Regards
    Kishore Guggilla

  • Sending data to mssql stored procedure that accepts variable of text  data

    Hi all
    i have a stored procedure in mssql 2000 whole input parameter is of type text
    how can i send data of type string from java class while calling storedprocedure using callable statement
    if ui use setString() function it gives an exception that data will be trunctated
    com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.
         at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
         at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerStatement.sendExecute(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecute(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(Unknown Source)
         at com.clearcube.util.DMLLayer.processClientRequest(DMLLayer.java:49)
         at com.clearcube.discovery.PushDiscoveryHandler.init(PushDiscoveryHandler.java:90)
         at com.clearcube.discovery.PushDiscoveryController$1.run(PushDiscoveryController.java:113)
         at java.util.TimerThread.mainLoop(Unknown Source)
         at java.util.TimerThread.run(Unknown Source)
    c
    if any one have solution to this problem plz reply me

    my stored procedure accepts input of type text
    i use text type becouse nvarchar is not enough to
    place data.
    and i want to send data that is greater than the
    length of varcharUnder setString in the API:
    "The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database."
    I am not sure what you should use then? Maybe setCharacterStream?

  • Spring Stored Procedure - Passing a Boolean Value

    Hi there,
    The Oracle Stored Procedure I am hoping to implement in Spring 2 has In and Out parameters of type PL/SQL Boolean.
    I am wondering if I need to create a wrapper Stored Procedure with Integers instead of Booleans in Order to be able to call the Stored Procedure with Spring since I get Invalid Sql Type Error message using OracleTypes.BOOLEAN or Types.BOOLEAN as the SQLParameter type to this message.
    declareParameter(new SqlParameter("p_commit", OracleTypes.BOOLEAN));
    or
    declareParameter(new SqlParameter("p_commit", Types.BOOLEAN));
    both give this error
    Regards
    Message was edited by:
    Enda Madden

    Oracle Jdbc Development did test that in
    8.1.6. Make sure you use java.sql.Types.BIT
    when you call registerOutParameter().

  • ODI Using Axis2 Passing Multiple Variables

    Hi,
    We are using Axis2 in between a .Net web app to pass four parameters to an ODI scenario. I am using SOAPUI to remove the web app from the testing process. Everything is working well except for the fact that only the last variable in the XML is ever read and stored in the ODI scenario execution. Below is a sample of our XML variable setup. In the ODI scenario we declare each of the four variables in the first four steps of the package (which I read somewhere was the proper setup). Regardless, if I remove the last two variable in the XML then only the second variable "v_HFMI_Fiscal_Year" is stored properly and the first is ignored. Furthermore, if I remove the last variable then the third is stored properly and the first two are ignored. Can anyone help?
    <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:odi="xmlns.oracle.com/odi/OdiInvoke/">
    <soapenv:Header/>
    <soapenv:Body>
    <odi:invokeScenarioRequest>
    <odi:Variables>
    <odi:Name>HFMI_PROJECT.v_HFMI_UserID</odi:Name>
    <odi:Value>CORMSBY</odi:Value>
    <odi:Name>HFMI_PROJECT.v_HFMI_Fiscal_Year</odi:Name>
    <odi:Value>2008</odi:Value>
    <odi:Name>HFMI_PROJECT.v_HFMI_Fiscal_Period</odi:Name>
    <odi:Value>06</odi:Value>
    <odi:Name>HFMI_PROJECT.v_HFMI_Submission_Type</odi:Name>
    <odi:Value>BPY2</odi:Value>
    </odi:Variables>
    </odi:Command>
    </odi:invokeScenarioRequest>
    </soapenv:Body>
    </soapenv:Envelope>

    Rhian80 wrote:
    I would use Applescript to do everything but I'm the only Apple person on staff and if I get hit by a beer truck tomorrow, someone has to know how to do this stuff. I figure they have better odds of finding someone on staff who knows UNIX.
    Another option may be to write the whole thing as a shell script and use Pashua or Platypus to create a GUI around it.
    One warning about creating and running shell scripts from AppleScript: make sure you correctly escape any user-supplied values when assembling the shell script. The easiest way to do this is by using the text object's 'quoted form' property, like this:
    do shell script "/Users/labadmin/Desktop/labbuild.sh " & quoted form of RoomNumber & space & quoted form of StationNumber
    or, if your shell script expects the room and station numbers to be supplied as a single argument rather than two separate ones:
    do shell script "/Users/labadmin/Desktop/labbuild.sh " & quoted form of (RoomNumber & StationNumber)
    If you forget to do this, Very Bad Things can easily happen when the inputted text contains spaces or other 'special' characters, either by accident or intent, e.g.:
    set user_input to "; say Oops;"
    do shell script "echo My name is " & user_input
    Do a web search for 'injection attack' for more on the perils of failing to sanitize your inputs properly.
    Incidentally, the latest edition of Apress's Learn AppleScript, which I co-wrote, has an entire chapter devoted to combining AppleScript and Unix shell scripting, if you're new to this subject./self-plug

  • Passing multiple variable values through Start Pointer

    Hi,
    I have a company code variable in my BI query, at initial run of the VC model i want to exclude multiple  company codes through start pointer, how can i write exclude condition for multiple values through company code variable field value input in start pointer, I don't want to change my BI query.
    please help me on this
    Thanks in advance

    Hi
    This document will be usefull for you:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/07134c67-0b01-0010-0493-b89287cf330f
    You should build string with following syntax and pass it to the start point:
    :[Value(End - optional)]:Operator:I (Includes) or E (Excludes)
    Available Operators:
    ·         EQ u2013 Equal to
    ·         GE u2013 Greater than or equal to
    ·         GT u2013 Greater than
    ·         LE u2013 Less than or equal to
    ·         LT u2013 Less than
    ·         BT u2013 Between
    For more help:
    http://help.sap.com/saphelp_nw70/helpdata/EN/44/4fc09c78ef4e35e10000000a1553f6/frameset.htm
    Good luck,
    Ola

Maybe you are looking for