How to Call variable value in OLEDB Command SSIS

Hi ,
I am facing one issue in SSIS OLEDB Command.under OLEDB Command there is sql update query
    UPDATE dbo.ArchiveBBxFbapp
    SET LatestVersion = 0
    WHERE BBxKey = ?
dbo.ArchiveBBxFbapp is the name of the table, which I want to change by dynamically on fly.
table name I am getting from variable .
I want to take same variable value instead of hard coded table name in update statement.
suggest me the correct command
thanks and regards,
Vipin jha
Thankx & regards, Vipin jha MCP

For that you've to first store the query itself inside a variable after setting EvaluateAsExpression as true.
Then use expression as below
"UPDATE dbo." + @[User::TableName] +
"SET LatestVersion = 0
WHERE BBxKey = " + @[User::ColumnValue]
Use option as SQL command from variable for data access mode property
Then map the variable containing query above inside this OLEDB command.
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

Similar Messages

  • How to set variables values via VBA.

    Anybody please help.
    How to set variables values via VBA in workbook. SAP Netweaver 2004s.

    Pass variable values with VBA and BI 7.0 funtions to Query
    At first a remark u2013 Iu2019ve read a lot of threads saying that passing values to a query can be done by using VBA code only. Iu2019ve tested it but Iu2019m not sufficient with the new BEX 7.0 API and therefore I use a mixture of BEX 7.0 funtionality and VBA. I create a BEX 7.0 design item button passing the values to a query u2013 I hide this button somewhere on the sheet or on a hidden sheet and I then raise the event to click the button from VBA code. Works fine and the maintenance is easier if something changes in the API in the future again.
    How to start:
    Switch to design mode in BEX Analyzer:
    Implement a BEX 7.0 design item u201Cbuttonu201D
    Click on the button to implement the properties
    Make the input for the commands
    data_provider = dataprovider_1
    cmd = process_variables
    subcmd = var_submit
    No comes the part with the variables u2013 Letu2019s assume a query has 4 variables but you only want to change 1 with the button u2013 an organizational unit for instance.
    Make a range somewhere in the excel with the following structure:
    Name    Index   Value
    VAR_NAME_1      1       Variablename
    VAR_VALUE_EXT_1 1       variablevalue
    Value should contain the name of your variable of course and u201Cvalueu201D the value of your variable
    Set a name for this range with EXCEL functionality but without the header:
    Back to the properties of the button: Insert the name of the range with the variables in the field Command Range:
    If you have more variables to process you can of course enhance your Filterrange!
    In the left upper Corner you have a name for your button:
    Now you can raise the button-click in vba like this:
    Application.Run "'" & ThisWorkbook.Name & "'!Sheet2.BUTTON_35_Click"
    regards, Lars

  • How to Read Variable Values in WAD 7.0 Using JavaScript

    I found a how to: How to Read Variable Values in WAD 7.0 Using JavaScript on SDN.
    I get a Javascript error:
    bics.getElementsByTagName is not a function
    vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
    Thats my script:
    function currency()
    var varnm = "SFS_CP_CURR"; // Name of the variable to be read
    root = document.childNodes[0]; // <HTML>
    body = root.getElementsByTagName("BODY")[0]; // <BODY>
    xml = body.getElementsByTagName("XML")[0]; // <XML>
    bics = xml.childNodes[0]; // <BICS_VIEW>
    vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
    varl = vars.getElementsByTagName("VARIABLE"); // gives no. of variable in DP
    for ( i = 0; i <= varl.length; i++ ) // Loop one by one
    vari = vars.getElementsByTagName("VARIABLE")<i>;
    varnam = vari.attributes[0].text; // get variable name
    mem = vari.getElementsByTagName("MEMBER")[0];
    varval = mem.attributes.getNamedItem("name").value; // read variable value
    if (varnam == varnm) //check varname in loop needs to be read
    if (varval == "ZMON") // check for value1 and fire command1
    SFS_CP_M();
    if (varval == "ZKON") // check for value2 and fire command2
    SFS_CP_K();
    break;
    Where's the mistake?

    I'm afraid I haven't made my question understood clearly.
    What I am looking for is a method to get the value of variable inside excel (e.g. put it into a cell / range of a worksheet, so that we can reference it and use it as an input for planning function execution).
    Please advice.
    Thanks in advance,
    Shady

  • How to call a ODI Job using Command line?

    Hello All,
    Please help me on this..
    How to call an ODI Job using Command line?
    Thanks
    Ravikiran

    Generate a scenario of your package. Then go to <ODI_HOME>/oracledi/agent/bin in command prompt and invoke startscen command .
    startcmd.sh OdiStartScen -SCEN_NAME=scn_load_data -SCEN_VERSION=001 -CONTEXT=GLOBAL -AGENT_CODE=odiSchedAgent001
    Bhabani
    http://dwteam.in

  • How to call & pass values to custom page from seeded page table region

    Hi All,
    can anyone tell me how to call & pass values to custom page from seeded page table region(Attribute is not available in seeded page VO)
    it is urgent. plssss
    Regards,
    purna

    Hi,
    Yes, we do this by extending controller, but you can also try this without extending controller.
    1. Create Submit Button on TableRN using personalization.
    2. Set "Destination URI" property to like below
    OA.jsp?page=/<yourname>/oracle/apps/ak/employee/webui/EmpDetailsPG&employeeNumber={@EmployeeId}&employeeName={@EmployeeName}&retainAM=Y&addBreadCrumb=Y
    Give your custom page path instead of EmpDetailsPG.
    EmployeeId and EmployeeName are VO attributes(Table Region)
    If you dont have desired attribute in VO, then write logic in your custom page controller to get required value using parameters passed from URL path.
    In this case, only personalization will do our job. Hope it helps.
    Thanks,
    Venkat Y.

  • How to change variable values ?

    Dear friends,
    How to change variable values when we are broadcasting the Queires ?
    Do we need to change them everytime ?
    Thanks,
    N

    Hi,
    Please go through it.
    /people/ramkumar.ghattamaneni/blog/2008/02/25/using-variables-while-broadcasting-queries-to-the-portal-in-bi-7
    Regards,
    Ramkumar.

  • How to reference variable values in a BW Web Template

    Hi All,
    I'm having a problem which I hope someone can help me with.
    OVERVIEW
    I've developed a BW Web template with (among other things) a TEXTELEMENTS Web Item and a TABLE Web Item. I've enhanced the context menu so that when a user selects a row within the TABLE, they can start a SEM-BPS Web interface (which displays a manual planning layout). I've used the 'How to call a BPS Web Interface with Predefined Selections' document to get the basic mechanism working. The JavaScript function I've written successfully passes the variable (DFCOST_PL) value to the planning layout.
    THE PROBLEM
    The problem is twofold....
    1. I need to pass the value for a variable (FEPCVERS) to the layout. However I do not know how to make reference to the variable in JavaScript. The variable is available within the TEXTELEMENTS_1 object but how do I address it?
    2. On a similar vein, I need to pass the value for a field within the table row to the planning layout. The TABLE_2 object contains the fields (DFCOST_PL and DFGROUPS). When the user selects a line the value for DFCOST_PL is available to the JavaScript function (ZAJT_JS_Maintain_Rules) in the 'parameter1' field. However, how do I make the DFGROUPS field available?
    Below is the HTML code for my Web Template. Any help would be greatly appreciated.....
    <!-- BW data source object tags -->
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="SET_DATA_PROVIDER">
             <param name="NAME" value="DATAPROVIDER_2">
             <param name="QUERY" value="ZAJT3_COST_BASE_BY_COST_POOL">
             <param name="INFOCUBE" value="Z_FEPC_CB">
             DATA_PROVIDER:             DATAPROVIDER_2
    </object>
    <!--BW HTML data source object tags: -->
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="SET_PROPERTIES">
             <param name="TEMPLATE_ID" value="ZAJT_RULES_ENTRY">
             <param name="VARIABLE_SCREEN" value="X">
             <param name="CMENU_LABEL_1" value="ZAJT Maintain Rules">
             <param name="CMENU_FUNCTION_1" value="ZAJT_JS_Maintain_Rules">
             <param name="CMENU_PARAMETER_1" value="1">
             <param name="CMENU_CELL_TYPE_1" value="CHARACTERISTIC_VALUE">
             <param name="CMENU_FILTER_1" value="DFCOST_PL">
             <param name="CMENU_VISIBILITY_1" value="X">
             <param name="CMENU_POSITION_1" value="TOP">
             TEMPLATE PROPERTIES
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="SET_DATA_PROVIDER">
             <param name="NAME" value="DATAPROVIDER_1">
             <param name="QUERY" value="ZAJT3_COST_BASE_BY_PC_NODE">
             <param name="INFOCUBE" value="Z_FEPC_CB">
             DATA_PROVIDER:             DATAPROVIDER_1
    </object>
    <html>
      <head>
        <title>BW Web Application</title>
        <link href= "/sap/bw/mime/BEx/StyleSheets/BWReports.css" type=text/css rel=stylesheet>
      </head>
    <!--ZAJT Test code start -->
    <SCRIPT language="JavaScript">
    function ZAJT_JS_Maintain_Rules(parameter,cell_type,filter,parameter1,parameter2,item,dataprovider,x,y)
      var url;
      var cpool=parameter1;
      switch (parameter)
        case "1":
          url="http://dknborisdev.dcb.defence.gov.au:3280/sap/bc/bsp/sap/zbps_var_set/zbps_var_set.htm?area=ZFERULES&bps-appl=ZAJT_RULES3&var1=ZWEBCP&value1_1=" + cpool;
         SAPBWOpenWindow(url ,"MaintainRules" ,600,400);
         break;
    </SCRIPT>
    <!--ZAJT Test code end -->
      <body>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="TEXTELEMENTS_1">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEXT_ELEMENTS">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1">
             <param name="CLOSED" value="X">
             <param name="SHOW_COMMON_ELEMENTS" value="">
             <param name="SHOW_FILTERS" value="">
             <param name="ELEMENT_TYPE_1" value="VARIABLE_K">
             <param name="ELEMENT_NAME_1" value="FEPCVERS">
             <param name="ELEMENT_TYPE_2" value="VARIABLE_K">
             <param name="ELEMENT_NAME_2" value="DF_GRP">
             <param name="ELEMENT_TYPE_3" value="VARIABLE_K">
             <param name="ELEMENT_NAME_3" value="ZCSTCNTR">
             ITEM:            TEXTELEMENTS_1
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="NAVIGATIONBLOCK_2">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_NAV_BLOCK">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_2">
             <param name="CLOSED" value="X">
             <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_1">
             <param name="TARGET_DATA_PROVIDER_2" value="DATAPROVIDER_2">
             ITEM:            NAVIGATIONBLOCK_2
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="PC_HIERARCHY">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_HIERDD">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1">
             <param name="CLOSED" value="X">
             <param name="CAPTION" value="Profit Centre Hierarchy">
             <param name="BORDER_STYLE" value="BORDER">
             <param name="IOBJNM" value="0PROFIT_CTR">
             <param name="HIERARCHY_NAME" value="PROFIT_CTR_ZFEPCBP05">
             <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_2">
             <param name="TARGET_DATA_PROVIDER_2" value="DATAPROVIDER_1">
             ITEM:            PC_HIERARCHY
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="TABLE_1">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1">
             <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_1">
             <param name="TARGET_DATA_PROVIDER_2" value="DATAPROVIDER_2">
             ITEM:            TABLE_1
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="TABLE_2">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_2">
             ITEM:            TABLE_2
    </object>
      </body>
    </html>

    Hi Heike,
    Thanks for your response. The example you gave me works nicely. I've tried to use the same concept on a FILTER object, but it does not seem to work. I declared the object as below:
    </span>
    <span style="display:none;visibility:hidden" id="0PROFIT_CTR_value">
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="FILTER_1">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1">
             <param name="HIDDEN" value="X">
             <param name="GENERATE_CAPTION" value="">
             <param name="PRESENTATION" value="KEY">
             <param name="ITEM_FILTER_IOBJNM_1" value="0PROFIT_CTR">
             <param name="PRESENTATION_1" value="KEY">
             <param name="ONLY_VALUES" value="X">
             ITEM:            FILTER_1
    </object>
    </span>
    and then use
    document.getElementById('0PROFIT_CTR_value').innerHTML.
    However, the value returned is blank. Is there a different method required for filters?
    Also, you mentioned that to access the second variable I will need to use the table interface. Is this difficult to do? I'm booked on the NET050 (Developing Web Applications) course, but it's not until late November. Do you think that this course would cover this kind of processing?

  • How to pass variable value to field of standard sap transaction.

    Hi Experts,
       i want to pass the value of variable to field of standard sap transaction. but that field is not having the parameter ID. so please tell me how i pass the value to field.
    thanks in advance.

    You might like to provide a few more details of which field and transaction you are trying to interact with... typical solutions involve user exits / BAdIs / Enhancements, or transaction variants, or building a BDC to part fill the screens of the Tcode you are calling.
    Jonathan

  • How to call applescript values?

    Hi,
    Now am working in indesign CS2 Scripting.. I need to call a applescript.. so that i used doScript..
    i have 2 doubts...
    1) If i choose a file in the javascript, the file path structure is like "~/Desktop/New/1.jpg". I need to get the full parent folder path of file.. is it possible???
    2) If i set a value to a variable in applescript.. how do i call the value from the javascript??? using doScript???
    Thanks in advance..
    by
    Subha

    I know very little about JS, but these are fairly easy to accomplish in AS.
    [1] get path to home folder
    will return the equivalent of the "~" path.
    Or in your specific example to get an image in the desktop folder you could also use something like:
    set myPath to ("" & (path to desktop folder) & "New:1.jpg")
    If you want it returned with slashes instead of colons in the path, add posix path of:
    set myPath to posix path of ("" & (path to desktop folder) & "New:1.jpg")
    [2] I think the last line of your AS should be something like "return myResult". Then whatever variable you assign the doScript to should get the results you return.

  • How to call variable SlideID

    Hi all,
    I recently started using the export function for captions for translating purpose. That´s when I first saw the variable "Slide ID". It´s apparantly not a default user or system variable but I would like to use the Slide ID as reference for bigger projects as it´s unique and doesn´t change unlike slide number. I´ve tried messing around with the available system variables, adding SlideID instead of SlideNumber and stuff like but no luck so far. Does anyone know how to call that particular variable?
    Any help is appreciated.
    Thanks,
    goldmundig

    Aside from using AS3 in a widget, I'm not sure how you could accomplish it.  If you're using AS3, you can access the movieXML variable off of the maintimeline and that XML has unique identifiers for the slides as well.  But that only helps you in widget scenarios.  Maybe you could concatenate the slide label with some static text for a meaningful unique ID?  Possibly create a variable for each slide and assign the value on slide entry?... probably more work than it's worth.  It would be nice to have the Slide ID exposed...
    Jim Leichliter

  • How to set variable value in an XML array

    Hi,
    Please let me know how to set the value for a xml array element using assign activity inside a for-each block in BPEL 11g
    I tried to set the variable value for result element using the below condition but i encountered selection failure message
    $outputVariable.payload/ns1:Student['i']/ns1:result or
    $outputVariable.payload/ns1:Student[$i]/ns1:result
    And the xsd used is as below
    <xsd:complexType name="StudentCollection">
    <xsd:sequence>
    <xsd:element name="Student" type="Student" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Student">
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="location" type="xsd:string"/>
    <xsd:element name="mark" type="xsd:string"/>
    <xsd:element name="result" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    Thanks,
    Dhana

    Hi,
    At the back of button specify the following parameter:-
    CMD    1        Execute_planning_function
    Planning_function_name  1   xyz
    Var_name     1    variable_name
    var_value      1    blank
    Can also refer to link below:-
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0a89464-f697-2910-2ba6-9877e3088954?quicklink=index&overridelayout=true(can refer to page 20)
    http://www.sdn.sap.com/ddc5564a-337d-4cf9-a34e-2dab64df09be/finaldownload/downloadid-a61a6724ba8e7b7fbd9c5df9590ab50d/ddc5564a-337d-4cf9-a34e-2dab64df09be/irj/scn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be?quicklink=index&overridelayout=true
    Hope it may help

  • How to get variable value in BI 7.0 Workbook (Excel 2007)

    Dear experts,
      We are creating workbooks with BI 7.0 BEx Analyzer Addon 7.10 (Excel 2007).
    And we'd like to get the variable value (that are passed to the backend using the variable screen) so that we can reuse it as an input value for planning function execution later.
      Any idea on how we can achieve this is high appreciated.
    Thanks in advance,
    Shady

    I'm afraid I haven't made my question understood clearly.
    What I am looking for is a method to get the value of variable inside excel (e.g. put it into a cell / range of a worksheet, so that we can reference it and use it as an input for planning function execution).
    Please advice.
    Thanks in advance,
    Shady

  • How to put Variable value into Labeltext of a subcomponent WIB

    Hello
    In our Web Based Planning tool we uses Tabstrib_control component and the Label-Text is filled like 'Plan 2008'. (Our BPS = 3.5 and Web interface builder)
    I am looking for a way,how to put a variable into the Label field of the component.  I am not sure if there is a possibility to enhance the labelfield with variable values.
    Thanks a lof for any good idea.
    Best regards
    Christian
    Our BPS = 3.5 and Web interface builder

    Hello Christian,
    Maybe I have a solution for your problem.
    1. Create subcomponent "Selector variable" with your variable.
    2. Hide this new subcomponent
    3. Write in the Label-Text: <%=descr("Name of new subcomponent"/value)%>
    If the variable will be selected by the user in the web interface, put the name of this selector in the field "Update upon Change of" in the properties of the new created subcomponent.
    Hope this helps.
    Friedrich

  • How to replace variable value of a sql query dynamically

    Hi all,
    Trying to execute sql queries present in Oracle table and the query it self contains the ODI variable #EMP_NO.
    At the run time we thought of passing the variable values.
    table contains query like
    update table <table name> set <column name>= 5000 where emp_no = #EMP_NO
    We need to execute the sql query using a ODI procedure, to pick the sql query from table we use another variable #varSQLID and in the command on source tab wrote like
    select sql_query varSQL from emp_sql where query_id=#varSQLID
    Command on target
    #varSQL
    when ever I tried to execute I am getting error please let me know what changes are required .
    The question is whether it's possible to replace the variable value present in the above sql ?
    regards,
    Palash Chatterjee

    Thanks Siddhartha,
    Actually we have been doing the same, means half of the query has been kept in the table and rest is being added in the " command on source " tab of the procedure .
    But the problem is , the "where" condition is not same for all SQL queries,
    to provide 27 different sqls queries for 27 packages we have to create 27 procedures (as "where" condition may take other column values along with "EMPNO" for the JOIN condition ) .
    Any suggestion of keeing SQL along with the variable and storing it in the table may resolve our problem and work of 27 procedures can be performed by a single procedure .
    regards,
    Palash Chatterjee

  • How to change variable values dynamicly  in broadcasting

    Dear Friends i am scheduling workbooks using broadcasting feature.
    i want to know how can i change the variable values of report in broadcasting dynamically.
    becuase i dont want to schedule report again and again after changing the variable values.
    Regards
    Malik

    i did the same but its not working.
    i create one variant for the query ABC  using RSRT now if i look into table RSRVARIANT we can see that variant
    entry in this table. Now i create variant by bex on this query with the same name.
    now i schedule it using broadcasting but its not takeing the values of RSRVARIANT table.
    Its taking the value of variant which i save in bex.
    By default variant which is save in bex not appear in RSRVARIANT table.
    But i f you make a variant in RSRT you can see those entries in Table RSRVARIANT.
    But RSRT variant is not showing in Broadcast scheduling. Only Bex variant are showing.
    Where should create the variant in Workbook, in Bex web analyzer, or in RSRT.
    Regards
    Malik
    Edited by: Malik Naeem on Jun 9, 2010 2:05 PM

Maybe you are looking for

  • Code won't compile - array

    This is my first in depth attempt to understand the code for enabling arrays. I THINK I have a fairly simple problem, but the code won't compile and NetBeans is telling me I'm missing a symbol &/or class, which I just don't get. Here is the code for

  • Is there a way to sinc songs from your ipod onto a new itunes library

    hi, i was wondering if there was a way to sinc songs from your ipod to a new itunes library but from the same account. cause my computer just broke and i lost all my songs from my itunes library that were on my computer and i was wondering if i bough

  • [solved] Gnome lockscreen questions

    1. Is there a way to get rid of the necessity to pull up the gnome lockscreen or press enter or escape before I can type the password? I want to type directly the password without pressing any button before. 2. Can I set up gnome to blank the screen

  • Installing oracle forms and reports 6i

    Hi If I install oracle forms and reports first on win xp pro, then will I be able to install database after that using the oracle installer from the CD? When installing oracle forms and reports 6i, I get a screen says which product u want to install?

  • AirPlay switches to internal speakers

    Streaming music/sound from any source (including Spotify) worked fine after I upgraded to Mountain Lion half a year ago. About two weeks ago, it stopped working. When I select Airplay when Spotify is playing, there is no output for about 10 seconds,