How to replace the structure in the BI Query

Hi Guys
We have a query and we have a structure in the ROWS section. We want to replace this structure with another one which is aviable in the query.
For some reason i am able to remove the structure from the ROWS section but i am unable to drag a new structure in the ROWS section. Any idea what i am doing wrong. We are on BI 7.0 version.

Hi Pravender,
Thanks for the quick response. I have tried that option and it does not work.
I am able to remove the existing structure from the ROWS section of the query and able to save the query. When i go back and try to drag and drop the new structure it does not allow me to drag and drop the new structure availble in the query.
apologies for my ignorance. I am new to BI so i might be doing something wrong. Does the structure needs to have any specific properties to be able to drag and drop? I have more than 10 structures availble in the query but i am unable to drag and drop anyone in the ROWS section.

Similar Messages

  • How can I fill structure from the line with contetnt of a XML file inside?

    How can I fill structure from the line with contetnt of a XML file inside?
    I have array of lines with XML documents inside. All XML's have the same structure.
    I need to fill array of structures (with the same structure like given XML's) from data of these XML's.
    How can I do this? I am trying Transformation with ora:parseEscapedXML, but receive error: "XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:processXSLT("Transformation_1.xsl", bpws:getVariableData("ProcessedFiles"))", the reason is javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Could not find function: parseEscapedXML.
    Please verify the xpath query."

    Ive posted the new code but now I'm getting a FileAlreadyExistException error. How do I handle this exception error correctly in my code?
    import java.io.IOException;
    import java.nio.file.FileAlreadyExistsException;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println(templateElement.getAttribute("name")+ ".xml");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      String fileName = templateElement.getAttribute("name") + ".xml";
      Files.createFile(Paths.get(fileName));
      System.out.println("File" + ":" + fileName + ".xml created");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

  • The structure in the query

    HI,BW experts, I have a question about the structure of the query :is there only one key figure in the query?in my query ,i have a key figure structure already, could I create another key figure structure,and how to ?
    Thanks for your help.

    Hi Cindy
    If your query already has a structure then why you want to create a new one? add new key figures to the exisiting structure.
    If you have to create new structure for key figures then
    GO to Query change in Query designer & in Columns section do right mouse click and select structure. This will add new structure and then you can add new key figures to that if you need.
    Hope this helps
    Regards
    Pradip

  • Level of the structure of the account accounting chart of accounts.

    HOW DO I KNOW SOMEONE pull a report that shows the level ACCOUNTING ACCOUNT IN THE STRUCTURE OF THE PLAN OF ACCOUNTS?
    EXAMPLE:
      BP02 balance sheet structure
       1 - ASSETS
         1.1 - ASSETS
          1.1.1-ASSETS AVAILABLE
                       111000 - BANK
    For this example the level of bank account would be the fourth. I need to know the level of all accounts of the formant chart of accounts.
    any help is welcome
    thank you

    Go to OB58
    Double click on your Financial Statement Version
    Click on financial Statement Versions (Shift+F8)
    Then(Shfit+F4)
    If this not your expectation, tell us more details
    Srinivas

  • Modifying the structure of the std CSV file in SNC FTR

    Hi All,
    We are using the File for SNI Monitor in SNC 7.0 Ehp1 to facilitate the suppliers in uploading their Inventory data (Unrestricted Stock on Hand) for their location products.
    The issue with the std. CSV file downloaded from the system is that it has all the key figures from the SNI Monitor which we are not interested in. We want the supplier to just see the following key figures for their location products:
    1. Unrestricted-Use Stock- New (its an editable field which the supplier updates in Period0)
    2. Unrestricted-Use Stock- Original (which contains the current inventory data in the SNC system for the location product)
    Now our concerns are:
    a. We are not able to apply the filter to the CSV file for the above key figures as a blank line between location products prevents filtering. This makes it very cumbersome for the supplier to update the stock data for 200+ skus using the std. file
    b. We tried formatting the std. file but ended up with errors on upload.
    Can anyone share their inputs on how to simplify the structure of the Std. CSV file.
    Note: We are looking for std. solutions.
    Regards,
    Bharath

    Hi Mayari,
    though you were successfull with
    METHOD cl_alv_table_create=>create_dynamic_table
    I must warn you not to use it. The reason is that the number of tables created is limited, the method uses GENERATE SUBROUTINE statement and this triggers an unwanted database commit.
    If you know the DDIC structure, it is (starting with ECC6.0) much easier:
    field-symbols:
      <table> type standard table.
    data:
      lr_data type ref to data.
    Create data lr_data type table of (<DDIC structure>).
    assign lr_data->* to <table>.
    The split code can be simplified gaining speed loosing complexity not loosing functionality.
    field-symbols:<fs_s> type any.
    field-symbols:<fs_t> type any.
    SPLIT lv_rec AT ';' INTO table it_string.
    loop at it_string assigning <fs_s>.
      assign component sy-tabix of wa_string to <fs_t>.
    if sy-subrc = 0.
      <fs_t> = <fs_s>.
    endif.
    at last.
      append <fs_itwa3> to <ft_itab3>.
    endat.
    endloop.
    Though it may work as Keshav.T suggested, there is no need to do that way.     
    Regards,
    Clemens

  • Show all the structure in the Query

    Hi people,
    I would like to know if there is some way to show all the structure I created by hierarchy to my query, enven if some nodes there isn´t any data.
    I have configurated to show only the lines there is amount. It means it won´t show the lines that have zeros.
    But the structure (all of the nodes) I would like to show, include that one there aren´t any datas.
    Thanks in advance,
    Rosana.

    Jaya,
    You are 10. It worked!.
    I only will leave opened this request yet because I would like a new suggestion.
    For exemple, I have the hierarchy but on the side "colum"  I already have a structure where is restricted by data because it is a report  "Year to Date".
    On this case, is it possible to do something to show all the structure of the hierarchy?
    Ps.: If it is necessary close this request and open a new one, you can tell me ok?
    Thanks a lot,
    Rosana.

  • How to replace a dates on a SQL query on Visual Studio (and get the query to work in there in the first place)?

    Morning all,
    I've just been assigned a report-related project but I have not created much of anything in C# or .Net before!
    I was wondering if someone could help me get started. Here are the specifications:
    Basically, I am to create an automated report application. I have the query and I will include it further down
    in this post. The page is to have a couple blanks to specify the Start Date and End Date and replace those dates in the query, and generate the report. What I need some help on is how to make the SQL query work in the application which I will connect to the
    intended database to generate the report (basic I know, but I'm new at this) on Visual Studio 2010. I also need some help on programming the Start Date blank and End Date blank so that what the user types in for those blanks will replace the date fields in
    the SQL query, then generate the report with the new dates. 
    I appreciate the help!
    The SQL query and what the dates are replacing:
    select 
    PTH.INST_ID ,
    PTH.EMPLOYEE_ID,
    DBH.HR_DEDUCTION_AND_BENEFITS_CODE,
    replace(DB.DESCRIPTION,',',''),
    DB.WITHHOLDING_LIABILITY_ACCOUNT_MASK,
    DBH.HR_DEDUCTION_AND_BENEFITS_ID,
    DBH.CHECK_DATE,
    DBH.CHECK_NO,
    DBH.FIN_INST_ACCT_ID,
    replace(replace (DBH.COMMENT,CHAR(10),' '),CHAR(13),' '),
    DBH.HR_DEDUCTION_AND_BENEFIT_CYCLE_CODE,
    DBH.LENGTH,
    DBH.EMPLOYEE_COMPUTED_AMOUNT,
    DBH.EMPLOYEE_BANK_ROUTING_NUMBER,
    DBH.EMPLOYEE_ACCOUNT_TYPE,
    DBH.EMPLOYEE_ACCOUNT_NUMBER,
    DBH.EMPLOYER_COMPUTED_AMOUNT,
    DBH.EMPLOYEE_GROSS_AMOUNT,
    DBH.EMPLOYER_GROSS_AMOUNT,
    DBH.PAYROLL_EXCLUDE,
    PTH.VOID_DATE,
    PTH.BATCH_QUEUE_ID,
    B.BATCH_CODE,
    BQ.FY,
    BQ.END_DATE,
    BQ.COMMENTS,
    BQ.BATCH_CRITERIA_USED,
    BP.COLUMN_VALUE,
    PTH.REPLACEMENT,
    P.LAST_NAME,
    P.FIRST_NAME,
    P.MIDDLE_NAME
    from PY_EMPLOYEE_TAX_HISTORY PTH
    INNER JOIN PERSON_EMPLOYEE PE ON
    PE.INST_ID=PTH.INST_ID AND
    PE.EMPLOYEE_ID=PTH.EMPLOYEE_ID
    INNER JOIN PERSON P ON
    PE.INST_ID=P.INST_ID AND
    PE.PERSON_ID=P.PERSON_ID
    LEFT JOIN HR_EMPLOYEE_DEDUCTIONS_AND_BENEFITS_HISTORY DBH ON
    PTH.INST_ID=DBH.INST_ID AND
    PTH.CHECK_DATE=DBH.CHECK_DATE AND
    PTH.CHECK_NO=DBH.CHECK_NO AND
    PTH.EMPLOYEE_ID=DBH.EMPLOYEE_ID
    LEFT JOIN HR_DEDUCTION_AND_BENEFITS DB ON
    DB.INST_ID=DBH.INST_ID AND
    DB.HR_DEDUCTION_AND_BENEFITS_CODE=DBH.HR_DEDUCTION_AND_BENEFITS_CODE
    LEFT JOIN BATCH_QUEUE BQ ON
    PTH.BATCH_QUEUE_ID=BQ.BATCH_QUEUE_ID
    LEFT JOIN BATCH B ON
    B.BATCH_CODE=BQ.BATCH_CODE 
    LEFT JOIN BATCH_PARAMETER BP ON
    BQ.BATCH_QUEUE_ID=BP.BATCH_QUEUE_ID
    AND BP.COLUMN_NAME = 'SUPPRESS_DIRECT_DEPOSIT'
    ------Please change the WHERE condition for date range of the month you need to run this for.
    WHERE PTH.CHECK_DATE >='07/01/2013'
    AND PTH.CHECK_DATE <='07/31/2013'
    and BQ.BATCH_CODE='BAT_PY_PAYCALC'
    and bq.fy=2014
    ORDER BY PTH.INST_ID ,
    PTH.EMPLOYEE_ID,
    DBH.HR_DEDUCTION_AND_BENEFITS_CODE,
    DBH.CHECK_DATE

    Try this code.  The Server name will be the same name when you use SQL Server Management Studio (SSMS).  It is in the login window for SSMS.  I assume you are using SQLSTANDARD (not SQLEXPRESS) which is in the connection string in the code
    below. I also assume you have remote connection allowed in the database.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    using System.Data.SqlClient;
    namespace ConsoleApplication1
    class Program
    const string DATABASE = "Enter Database Name Here";
    const string SERVER = "Enter Server Name Here";
    static void Main(string[] args)
    DateTime startDate = DateTime.Parse("07/01/2013");
    string startDateStr = startDate.ToString("MM/dd/yyyy");
    DateTime endDate = new DateTime(startDate.Year, startDate.Month + 1, 1).AddDays(-1);
    string endDateStr = endDate.ToString("MM/dd/yyyy");
    string connStr = string.Format("Server={0}\\SQLSTANDARD;Database={1};Trusted_Connection= True;", SERVER,DATABASE);
    string SQL = string.Format(
    "select\n" +
    " PTH.INST_ID\n" +
    ",PTH.EMPLOYEE_ID\n" +
    ",DBH.HR_DEDUCTION_AND_BENEFITS_CODE,\n" +
    ",replace(DB.DESCRIPTION,',','')\n" +
    ",DB.WITHHOLDING_LIABILITY_ACCOUNT_MASK\n" +
    ",DBH.HR_DEDUCTION_AND_BENEFITS_ID\n" +
    ",DBH.CHECK_DATE\n" +
    ",DBH.CHECK_NO\n" +
    ",DBH.FIN_INST_ACCT_ID\n" +
    ",replace(replace (DBH.COMMENT,CHAR(10),' '),CHAR(13),' ')\n" +
    ",DBH.HR_DEDUCTION_AND_BENEFIT_CYCLE_CODE\n" +
    ",DBH.LENGTH\n" +
    ",DBH.EMPLOYEE_COMPUTED_AMOUNT\n" +
    ",DBH.EMPLOYEE_BANK_ROUTING_NUMBER\n" +
    ",DBH.EMPLOYEE_ACCOUNT_TYPE\n" +
    ",DBH.EMPLOYEE_ACCOUNT_NUMBER\n" +
    ",DBH.EMPLOYER_COMPUTED_AMOUNT\n" +
    ",DBH.EMPLOYEE_GROSS_AMOUNT\n" +
    ",DBH.EMPLOYER_GROSS_AMOUNT\n" +
    ",DBH.PAYROLL_EXCLUDE\n" +
    ",PTH.VOID_DATE\n" +
    ",PTH.BATCH_QUEUE_ID\n" +
    ",B.BATCH_CODE\n" +
    ",BQ.FY\n" +
    ",BQ.END_DATE\n" +
    ",BQ.COMMENTS\n" +
    ",BQ.BATCH_CRITERIA_USED\n" +
    ",BP.COLUMN_VALUE\n" +
    ",PTH.REPLACEMENT\n" +
    ",P.LAST_NAME\n" +
    ",P.FIRST_NAME\n" +
    ",P.MIDDLE_NAME\n" +
    " from PY_EMPLOYEE_TAX_HISTORY PTH\n" +
    " INNER JOIN PERSON_EMPLOYEE PE ON\n" +
    " PE.INST_ID=PTH.INST_ID AND\n" +
    " PE.EMPLOYEE_ID=PTH.EMPLOYEE_ID\n" +
    " INNER JOIN PERSON P ON\n" +
    " PE.INST_ID=P.INST_ID AND\n" +
    " PE.PERSON_ID=P.PERSON_ID\n" +
    " LEFT JOIN HR_EMPLOYEE_DEDUCTIONS_AND_BENEFITS_HISTORY DBH ON\n" +
    " PTH.INST_ID=DBH.INST_ID AND\n" +
    " PTH.CHECK_DATE=DBH.CHECK_DATE AND\n" +
    " PTH.CHECK_NO=DBH.CHECK_NO AND\n" +
    " PTH.EMPLOYEE_ID=DBH.EMPLOYEE_ID\n" +
    " LEFT JOIN HR_DEDUCTION_AND_BENEFITS DB ON\n" +
    " DB.INST_ID=DBH.INST_ID AND\n" +
    " DB.HR_DEDUCTION_AND_BENEFITS_CODE=DBH.HR_DEDUCTION_AND_BENEFITS_CODE\n" +
    " LEFT JOIN BATCH_QUEUE BQ ON\n" +
    " PTH.BATCH_QUEUE_ID=BQ.BATCH_QUEUE_ID\n" +
    " LEFT JOIN BATCH B ON\n" +
    " B.BATCH_CODE=BQ.BATCH_CODE\n" +
    " LEFT JOIN BATCH_PARAMETER BP ON\n" +
    " BQ.BATCH_QUEUE_ID=BP.BATCH_QUEUE_ID\n" +
    " AND BP.COLUMN_NAME = 'SUPPRESS_DIRECT_DEPOSIT'\n" +
    " WHERE PTH.CHECK_DATE >='{0}'\n" +
    " AND PTH.CHECK_DATE <='{1}'\n" +
    " and BQ.BATCH_CODE='BAT_PY_PAYCALC'\n" +
    " and bq.fy=2014\n" +
    " ORDER BY PTH.INST_ID\n" +
    ",PTH.EMPLOYEE_ID\n" +
    ",DBH.HR_DEDUCTION_AND_BENEFITS_CODE\n" +
    ",DBH.CHECK_DATE", startDateStr, endDateStr);
    SqlDataAdapter adapter = new SqlDataAdapter(SQL, connStr);
    DataTable dt = new DataTable();
    adapter.Fill(dt);
    jdweng
    Could you elaborate more on what this code does in general?
    Does it generate a table with the data between specified dates? If so, where is the table shown? 
    Where does one enter in the specified start and end dates on the Web Application? Do I have to create start and end date blanks and link them to the code for it to work?
    Sorry for the inconvenience - I'm just really new at this. Thanks!

  • How I create a structure in the ABAP DICTIONARY?

    I need a structure for a FORM, how can I create a structure in the ABAP DICTIONARY?
    Thanks!!

    Hi Carlos,
    Go to SE11(ABAP Dictionary).
    Select the Data Type radio button.
    Specify the name for your structure.
    Note structure in customer namespace should start with Z or Y.
    Press the create button.
    Then in the next dialog box select the structure radio button.
    Then you will get in to the structure screen.
    Give a meaningful description for your structure.
    Add the relevant fields and finally activate.
    Regards,
    Abdul

  • How to use the structure in the EXIT_SAPMM06E_013 function module

    Hello Experts,
    Please guide me how to use the structure defined in function modules under  table tab in the driver program for smart form to fetch the data. Please post some sample code if available.
    Best Regards,
    Sandesh.Sreyamsh

    Can you please elaborate little bit more what is the actual requirement?

  • JEditorPane: how to replace small parts of the document?

    Hi
    Im trying to create an application that will allow two people to type into two different JEditorPanes, but have the two people essentially editing the same document. So if one person types someting into thier frame, I want that modification sent to the other frame as well.
    The problem I've come across is how to make changes to the contents of the frame without interfering with the person whos trying to type into it. That problem boils down to how do you replace only a small part of the document whithout taking control of the users caret?

    Hopfully I got your problem right. To change only small parts of the EditorPane's document should not be the probelm you can get it with EditorPane.getDocument(). But I think you have to take control over the caret, because the when user 1 has finished editing and sends the doc to user 2 who is editing the doc, user 2's caret position will change because the document length has changed.
    The easiest way would be to add an input area (TextArea) for each user where they can type theit text and than to add the text into the document when they press enter, so you don't have the trouble with te caret position. If you don't want to do this then you could try that: the input of the users is cached while they are typing (not changing the doc) till they press enter. Then the doc is send to the other user, the users doc in the pane is updated and his current typing is added to the end of the new received doc. You can figure out the correct position by doc.getLength() and set the new caret position to doc.length + currentTyping.length
    Hope that helps
    Eryk

  • How to replace a component in the JPanel?

    Hi,
    I want to replace a component in the JPanel. My panel has GridBagLayout.
    Thanks in advance.

    because my application demands me to use GridBagLayout.No it doesn't, that a choice you made. You are never forced to use a specific layout manager. In fact most layout problems are solved by using combinations of layout managers. You two main choices are:
    a) use a GridbagLayout for the main panel and then a CardLayout for the two components you want to sway, although it may look strange if the components are a different size as the preferred size of the panel will be the size of the largest component
    b) Simulate a card layout using:
    panel.remove(...)
    panel.add(...);
    panel.revalidate(...)

  • Does SharePoint search depend on the structure of the site

    Hello All
    I am a be gainer in sharepoint server 2010
    My question is, in front of me there are two structure for storing the document
    one --  
     The are hierarchical structure like 
    My site -- Team site -- India --        
    IT --      document library 1 --  list of documents 
    Sales --  document library 2 --  list of documents
    Consulting -- document library 3 --  list of documents
    and flat structure like 
    My site --  Document center --  
        document library 1 --  list of documents
      document library 2 --  list of documents
    document library 3 --  list of documents
    Now my question is , would it be easier to find a doc, if all of the documents are in one document center? or it does not matter, whether  they are on the page(hierarchical) structure?please give a details overview if possible
    Nilanjan

    It depends on the query you are using to find the document.  In your first example you can find all the documents related to Sales by searching on 'Sales' and finding that document library.  In the second example it would depend on how the documents
    are tagged with metadata.  If all the Sales documents have Sales as a value in one of the columns associated with the document you could still find Sales.  The structure itself doesn't affect the search result.  But the hierarchical structure
    may add context that can be used in searching that may not be present other ways.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • The structure of the profit center report in new GL

    Hello,
    I must finish a query for the customer this week. This query must base on a sap standard report for the new GL.
    Because our ECC 6.0 system hasn't the Enhancement Package 3 (contains the necessary new features) yet, so I can't see this standard report which should be displayed under the path:
    SAP Menu --> Accounting --> Financial Accounting --> General Ledger --> Information System --> General Ledger Reports (New) --> Profit Center Reports --> S_E38_98000088 - Profit Center Group: Plan/Actual/Variance
    Can somebody tell me the structure of this report, if you can see this report in your system?
    - Which key figure has been used in the report?
    - What are in the rows and columns?
    - Which characteristics are available to navigation?
    - Which variables and General data selections are there?
    Hope somebody can help me. Thanks a lot!
    Best regards,
    Yuanyuan

    Hi,
    Then my suggesion is you copy the form & report structure  of most suitable report (which you have downloaded through FGIQ) .Modify the form according to your reporting requirement. Create new report by coping standard report & assign this newly created form to this report.This will serve your purpose.
    Please do not make any changes to standard report.Copy it & then do the changes.
    Transaction code for the same is FGI0 or  FGI1 or FGI2 or 3 or 4 or 5 or FGI6.
    Second suggestion is in SPRO in GL information system (infact in each information system ) you will find drilldown report node in that import report transaction e.g. FSIQ .Import all reports you might get your required report.
    Regards,
    Abhijit

  • So is this going to be the structure of the new fo...

    I have been as objective about this as I can but have to say I don't like the lack of clarity of the new forums, and would prefer clear areas of discussion such as:
    Connectivity
    Security and Privacy
    Gaming
    HomeHub
    BT Vision
    Phones
    Billing issues
    Computer Issues - Hardware
    Computer Issues - Software
    Suggestions
    Email
    Web Authoring
    An area such as BT in Home can cover a whole range of topics and gets very cluttered, and some of those topics can equally belong to, say, BT Out and About. And often one does not know where to post things - just look at the number of posts that have been moved from Forum Help and Suggestions, where people have posted because they don't know where else to go.
    What do others think?
    Value Added Guest (Inspiring Not Aspiring)
    Rate a post if you like it! - just click the star under the user's name on the left. (N.B. ratings facility no longer available in Forum Help and Suggestions; nor is it available in the Lounge)

    Allan_Quatermain wrote:
    Aye to that.  Just to add that a point was made back in January by Alun H about a General Discussion forum which seemed to generate interest.
    All the best forums have a Lounge where folk can discuss OT matters. It helps to build that essential spirit of camaraderie. The bt usenet groups have one and it's mostly inhabited by a handful of people making harmless smalltalk, one or two popping into the "serious" groups now and again to seek or provide learned advice.
    Allan_Quatermain wrote:
    Cant see the logic in reducing the number of post-headings myself, unless it is to reduce the traffic on the forum, which it seems to have done. 
    Yup, it's just not humming is it. And there's already a new thread in this group that supports my case for a Connectivity group - thanks Sid
    Value Added Guest (Inspiring Not Aspiring)
    Rate a post if you like it! - just click the star under the user's name on the left. (N.B. ratings facility no longer available in Forum Help and Suggestions; nor is it available in the Lounge)

  • 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

Maybe you are looking for