A way to convert selection from query builder in DML language

I search a way to convert selection from query builder in DML language.
regards

We will make a sample from this request and post it on OTN. I have pasted all the JSP code so you should be able to use it directly. Just change the BISession details and the presentation references.
<%@ taglib uri="http://xmlns.oracle.com/bibeans" prefix="orabi" %>
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import="java.util.Vector" %>
<%@ page import="oracle.dss.thin.beans.crosstab.ThinCrosstab" %>
<%@ page import="oracle.dss.util.DataAccess" %>
<%@ page import="oracle.dss.selection.Selection" %>
<%@ page import="oracle.dss.thin.beans.graph.ThinGraph" %>
<%@ page import="oracle.dss.dataSource.client.QueryClient"%>
<%-- Start synchronization of the BI tags --%>
<% synchronized(session){ %>
<orabi:BIThinSession id="BIThinSession1" configuration="/Project1BIConfig1.xml" >
<orabi:Presentation id="untitled2_Presentation1" location="Presentation1" />
<orabi:Presentation id="untitled2_Presentation2" location="Presentation2" />
</orabi:BIThinSession>
<%
String CROSSTAB_ID = "untitled2_Presentation2";
String GRAPH_ID = "untitled2_Presentation1";
String MYProducts = "Nothing";
String prodID = "MDM!D_CS_OLAP.SHAWPRODUCTS";
//Find the crosstab object on the page
Object crosstabObject = pageContext.findAttribute(CROSSTAB_ID);
ThinCrosstab thinCrosstab = (ThinCrosstab)crosstabObject;
//Get the various query components from the Crosstab
QueryClient myQCXtab = (QueryClient)thinCrosstab.getDataSource();
Selection mySelXtab = myQCXtab.findSelection(prodID);
DataAccess daXtab = myQCXtab.createQueryAccess().getDataAccess(mySelXtab);
// This is a one-d data access, only has the column edge
int colExtentXtab = daXtab.getEdgeExtent(oracle.dss.util.DataDirector.COLUMN_EDGE);
for (int i=0; i<colExtentXtab; i++)
String memberLabel = (String)daXtab.getMemberMetadata(oracle.dss.util.DataDirector.COLUMN_EDGE, 0, i, oracle.dss.util.MetadataMap.METADATA_LONGLABEL);
String memberValue = (String)daXtab.getMemberMetadata(oracle.dss.util.DataDirector.COLUMN_EDGE, 0, i, oracle.dss.util.MetadataMap.METADATA_VALUE);
System.out.println(memberLabel + " " + memberValue);
// As above except for graphs.
Object graphObject = pageContext.findAttribute(GRAPH_ID);
ThinGraph thinGraph = (ThinGraph)graphObject;
QueryClient myQCGraph = (QueryClient)thinGraph.getDataSource();
Selection mySelGraph = myQCGraph.findSelection(prodID);
DataAccess daGraph = myQCGraph.createQueryAccess().getDataAccess(mySelGraph);
// This is a one-d data access, only has the column edge
int colExtentGraph = daGraph.getEdgeExtent(oracle.dss.util.DataDirector.COLUMN_EDGE);
for (int i=0; i<colExtentGraph; i++)
String memberLabel = (String)daGraph.getMemberMetadata(oracle.dss.util.DataDirector.COLUMN_EDGE, 0, i, oracle.dss.util.MetadataMap.METADATA_LONGLABEL);
String memberValue = (String)daGraph.getMemberMetadata(oracle.dss.util.DataDirector.COLUMN_EDGE, 0, i, oracle.dss.util.MetadataMap.METADATA_VALUE);
System.out.println(memberLabel + " " + memberValue);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>
Hello World
</title>
</head>
<body>
<FORM name="BIForm">
<!-- Insert your Business Intelligence tags here -->
<orabi:Render targetId="untitled2_Presentation1" parentForm="BIForm" />
<orabi:Render targetId="untitled2_Presentation2" parentForm="BIForm" />
<%-- The InsertHiddenFields tag adds state fields to the parent form tag --%>
<orabi:InsertHiddenFields parentForm="BIForm" biThinSessionId="BIThinSession1" />
</FORM>
<h2>
The current time is:
</h2>
<p>
<%= new java.util.Date() %></p>
<input type="text" name="MyTextField" value=MYProducts readonly>
</body>
</html>
<% } %>
<%-- End synchronization of the BI tags --%>
Hope this helps
Business Intelligence Beans Product Management Team
Oracle Corporation

Similar Messages

  • Migrating from Query Builder to Discoverer 10g

    Can any one suggest that is there any ways that end user can edit/modify the query as they can do it in query Builder,with out editing worksheets.
    Currently the queries were created by File->Import Sql option and granted access to users.Is there any provision for end users to change the query according to their needs and use it with out affecting other users?.

    Hi
    No this is not possible. Discoverer is a GUI tool and that is the way you have to edit the query. Having altered the GUI then Discoverer will rewrite the SQL.
    Most end users don't have a clue about SQL in the first place. The whole point of having a GUI front end to ad-hoc query tool is that users don't need to know SQL to build a query. The EUL further means the users don't need to know how the database is put together.
    People who use Discoverer to point directly at the database tables are missing the point of the EUL. The users of those systems are also missing out on the full functionality of the tool. This is why you don't manually edit the SQL behind a Discoverer worksheet.
    Best wishes
    Michael

  • What is the best and safest way to convert songs from a dvd to an audio MP3?

    What is the best and safest way to convert a song/or songs from a dvd to an audio MP3? Are there any free safe converters?
    I have some live music from a concert (currently available on dvd only) that I want to convert to MP3 ... playable on my iphone.
    Thanks!

    Java float; IEEE 754 single precision has 32 bits: 1 sign bit, 8 bits of exponent, 23 bits for the mantissa.
    Java double; IEEE 754 double precision has 64 bits: 1 sign bit, 11 bits of exponent, 52 bits for the mantissa.
    When you widen a float value to a double this is what happens to the bits
       float:  s y   xxxxxxx mmmmmmmmmmmmmmmmmmmmmmm
       double: s y???xxxxxxx mmmmmmmmmmmmmmmmmmmmmmm00000000000000000000000000000try this
    class Widen {
        public static void main(String[] arg) {
            float f = (float)Math.PI;
            if (arg.length>0) {
                f = Float.parseFloat(arg[0]);
            double d = f;
            StringBuilder sf = new StringBuilder(toBinaryString(Float.floatToRawIntBits(f)));
            StringBuilder sd = new StringBuilder(toBinaryString(Double.doubleToRawLongBits(d)));
            sf.insert(1+8," ").insert(2,"   " ).insert(1," ");
            sd.insert(1+11," ")                .insert(1," ");
            System.out.println(sf.toString());
            System.out.println(sd.toString());
        static String toBinaryString(int i) {
            return toBinaryString((long)i).substring(32);
        static String toBinaryString(long l) {
            StringBuilder sb = new StringBuilder();
            for(int i=63;i>-1;--i) {
                sb.append(((l>>i)&1)==0?'0':'1');
            return sb.toString();
    }Please point out where you think there is loss of precision.

  • Date Data Selection in Query Builder using Hyperion JDBC Driver

    Hi,
    I am trying to filter out data prior to a specific request date on Query Builder. I have tried :
    and SALES_ORDER_FACT.REQ_DT < sysdate()
    I have also tried {$SYSDATE()-1$} , {$SYSDATE()$}, SYSDATE and SYSDATE()
    Any assistance will be appreciated.

    Is this related to Oracle BI Publisher?
    You should be able just to edit the query correctly in the text - you ddon't need to use the SQL query builder.
    The query is passed through so in general you should use the syntax of HJyperion.
    {} has a special (I think undocumented) meaning in BI Publisher so {} could potnetially cause problems.
    Klaus

  • Select from Query ? / Dynamic view ? Anything else ?

    Hello,
    This could be a bit challenging. (or maybe not, i hope)
    I have to create a report which is based on 3/4 tables with pretty complex SQL.
    Step 1. I have to use views (in the database currently) to select data from these tables.
    Step 2. Then create the next set of views (in the db) based on the previous views.
    Step 3. Then finally join the last set of views in Reports and create the report based on the PARAMETERS entered.
    This was fine, until the client changed the criteria. Now the views have to be created but the PARAMETERS affect the FIRST set of views.
    That is, the views in the FIRST STEP will have a where condition based on the parameters at RUN TIME.
    I was wondering about how to do this ?
    1. Can I use dynamic views (in db) passing the where condition parameter to the where clause ? Alternatively use DDL in Reports.
    OR
    2. Create a query in Reports and create subsequent QUERIES BASED ON THE FIRST QUERY (like MS Access). Can this be done ?
    3. Any other way ?
    If you need any clarification, I can provide that.
    THANKS for taking the time to read it. It would be great if you could give me any ideas.
    Pat.

    hello,
    you might look into REF-CURSOR-QUERIES for this particular case. it might help.
    regards,
    the oracle reports team

  • Lock users selected from query.

    I need to have the user IDs that are selected using the query I've pasted below locked. My thought was to put the query into an array and then use a loop to run through the array with the "alter user user_id account lock" command but I have no idea how to get that far is that even possible with plsql? Or perhaps there is a better way to do this. I would then be running this script once a week to make sure all of these users are locked.
    select username from dba_users where username like '_Z%'
    minus
    select distinct schema from monadmin.log_info where timestamp>=sysdate-92
    minus
    select account_status from dba_users where account_status = 'locked';

    select account_status from dba_users where account_status = 'locked';This will not return anything as the status is LOCKED not locked.
    secondly you will get account_status not the username
    BEGIN
        FOR rec IN (
                     select username from dba_users where username like '_Z%'
                    minus
                     select distinct schema from monadmin.log_info where timestamp>=sysdate-92
                    minus
                     select username  from dba_users where account_status like ( '%LOCKED')
                   ) LOOP
          EXECUTE IMMEDIATE 'ALTER "' || rec.username || '" ACCOUNT LOCK';
        END LOOP;
    END;
    / Alvinder
    Edited by: alvinder on Mar 18, 2009 10:54 AM

  • Need a Way to Clear Keywords from Query HUD

    I like using the Query HUD to select a variety of criteria (show me images in this import session with three or more stars keyworded "times square").
    But if I select a large project, there might be hundreds of keywords. (In my 2009 project alone, I have over 200 keywords so far.)
    Problem: if I have several hundred keywords, I can't tell if any of them are checked. The only way is to slowly scroll through the entire list looking for the checked boxes. And the only way to uncheck a keyword is to find it and manually uncheck it.
    The keywords section needs a "clear" button.
    I find this frustrating several times a week.
    (Another problem is that the dialog box is not expandable -- I can only see about 50 keywords at a time.)

    Found it. Hold down option and command and click on a new keyword and it unselects all the others (Same command as iCal)

  • Best Way to calculate totals from query

    Could someone point me in the right direction to add up my
    data and distinctly show it in my query?
    I have a table with the following fields:
    id, team_id, compname, teamname, totallost
    I want to add up the "totallost" row where the "team_id" and
    "compname" fields are the same...then show the compname with the
    sum of the totallost once in my table and determine who is
    winning.

    Thank you for the great help. This code works well, but is
    there a way to display the highest totallost and differentiate
    between competition names? My example is for one compname, but the
    table will have multiple compname's and I want to build a table
    showing only the highest totallost for each compname.
    You guys have been a great help. I learned something new
    today already.

  • Using RSCRM_BAPI to convert data from Query and load into PSA to DSO

    Hi Experts,
    I have a complex query which is being executed in BeX.
    I need to go in the reverse direction and extract the data from the Query and load into the PSA and then to a DSO.
    I am using RSCRM_BAPI for this purpose and have got data into the extract table successfully.
    But , my query has some variable screen wherein we need to give some inputs for selection.
    I have create those Infoobjects and put them in the DSO.
    How do I capture these inputs of  the selection screen for storing in fields of my DSO as the Extract table does not store these inputs  ???

    write the whole insert query desired by you with the help of excel formulas.they are very easy or google 'how to use excel formulas".
    then copy the fromula to whole set of data in excel fields.
    run the insert query in excel as batch.
    i hope this helps.

  • Fasted way to convert videos from iMovie HD for Windows?

    Hello,
    I want to dub MiniDV films with iMovie HD 6.0.3 (OS X 10.4.11) for editing under Windows, e.g. with Movie Maker and/or VirtualDub.
    I opened the iMovie package and converted the (native) DV files with Adobe Media Converter (Windows) into DV AVI (PAL DV) -- now I can open this film with on of the above mentioned programs.
    Question: is there a shorter way to prepare the movies from iMovie/Mac for Windows?
    Thanks!
    Carlos

    My plan was to make the dubbing on my second PC -- a Mac...
    I don't want to interrupt my work on my PC (und because of the larger storage on my Mac).
    But now I did it in my mentioned way: copying the DV files of iMovie to Windows, converting them with Adobe Media Encoder into DV PAL).
    Thanks for helping me!

  • Is there an easier way to convert files from Windows Media Player to iTunes

    I have many gb's of music in my Windows Media Player...now that I have an ipod I want to move the music over. Do I really have to do this one file at a time or is there away to move over whole albums at once? Is there a way to transfer the entire library at once? Do I have to reload ALL of those CD's? PLEASE HELP !!!!

    Maybe you can help me out too. I have copied over 250 gigs of music in WAV loss less files to windows media player. On media player I see the artist, album etc. However, when I add the file, either as the song or whole album only the track number and song title copy to the itunes. How do I get all the other information like genre, album title, artist. If I convert to applelossless I still do not get anything and when I search AppleSTore for album art nothing happens. Please help.

  • 3700 AP - Best way to convert back from Autonomous to LIghtweight

    I have a 3700 AP that I have up & running as Autonomous. I recently got a 2504 WLC and would like to put the AP back to Lightweight and run it from the 2504.  
    The 2504 is running 8.0.110.0 code and I have the current 3700 Lightweight Recovery image and IOS downloaded as well. 
    I have done done some searches and most of he articles are conversion to Autonomous. Not much is out there for putting it back. Some articles just mention needing the Lightweight  recovery image while others state I can use the Mode button and just have a TFTP server running  in a specific subnet and the AP will "pull" down the code and convert back.  Almost all of the articles refer to old model APs...
    Looking for clarity in the process as I certainly don't want to brick this 3700 AP. 
    Thx. 

    Hi
    You can use either methods & it will work (even for 3700)
    If you using mode button method, make sure you rename the recovery image something like this ap3g2-k9w7-tar.default. Refer this post for detail
    http://mrncciew.com/2013/12/13/ap-conversion-using-mode-button/
    Normal method is described here
    http://mrncciew.com/2012/10/20/lightweight-to-autonomous-conversion/
    HTH
    Rasika
    **** Pls rate all useful responses ****

  • Is there a way to convert bookmarks from opening as Fit Width size to Fit Page without doing each one individually?

    I have a document that has a number of bookmarks already in it.  I cannot figure out how to change their behavior when clicking on them unless I change each one one at a time.  There are 822 pages and at least that many bookmarks.  Any way to tell Acrobat to make them all open in a fit page view instead of the Fit Width they are in now?  Save me a ton of time.  Thanks for any help.  Using Acrobat Pro XI on a Mac...standalone application...not in the cloud.
    Bill

    Hi William,
    You can go to View> Zoom> Fit Width and the setting will be applied to the complete pdf.
    Regards,
    Rave

  • How to convert a sql query to a java language?

    A sql like this:"update myoracletable set name='myname',age=26,sex='female',address=NULL,visittime=SYSDATE,visitnum=visitnum+1where name='name' and address='address'",I want to use java language update such as :rs.updateString(),rs.updateDate() but not a sql update.How can I do in this case?

    Something like this?
    try{
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
         Connection con = DriverManager.getConnection("jdbc:oracle:thin:@your_server:1521:sid","scott","tiger");
         Statement st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
         ResultSet rs = st.executeQuery("SELECT deptno,dname,loc FROM dept where deptno=28");
         while(rs.next() ) {
              rs.updateString(2,"Some Name");
              rs.updateString(3,"Some Location");
              rs.updateRow();
              System.out.println(rs.getString(1)+" : "+rs.getString(2)+" : "+rs.getString(3));
    } catch (Exception e) {
         System.out.println(e);
    }Sudha

  • CM14 BI Publisher - modifying an existing Data Model, the Graphic View in Query Builder does not display

    I am trying to edit the default forms/reports that come with CM14, trying to edit the data model, data set, (to get to the old Infomaker style graphic view) , the Query model does not display (error the list of tables is too long..) Oracle tell me the limit is 60,  there are not 60 tables referenced in any CM report.
    Does this Query builder view work at all on any report?
    (bigger question, we are moving from CM12, should we move to CM13 which works with infomaker?)
    Thanks,
    Paul L

    Kurt, thanks for your replies.
    A couple of notes/clarifications.
    1.     You are correct that BI works better in Firefox--I have observed issues with the BI display when using IE.  I would recommend using Firefox too.
    2.     You are correct about the way to get to the Query Builder to see a graphical view of data tables.  There are basically two issues with this that I mentioned, but will re-iterate:
    a.  If you have an EXISTING query in the data set, then click the "Query Builder" button, this will remove the existing query that's there, it will NOT display the existing query in the query builder.  Query Builder works only to create a NEW query from scratch.
    b.  Query builder is limited to selecting 60 fields max in your query.  If you are creating a large report with many tables, you may find that 60 fields is not enough.  For that you will have to work in the SQL edit screen rather than using the query builder.
    I would impress on anyone developing CM14 reports that they become familiar with the database schema and relationships to avoid problems when developing your BI reports.  You should be able to find the tables and joins documentation in the knowledgebase.

Maybe you are looking for

  • How to install Cisco Work 3.2 on Windows 2008 Server Standard R2

    Hi Everyone, I have got Cisco Works LAN Management 3.2. But the problem is that i have a Windows 2008 Server Standard R2 and when i try to install, it fails. What I read from the below link is that it supports "Windows 2008 Server Standard and Enterp

  • Error in FAX output

    Hi All, I am getting following error when I send the output to fax. Conversion from OTF to PS: Termination in C_RSPO_PROCESS_DIALOG, return code   128 Printjob not found Conversion from OTF to PS: Termination in SX_OBJECT_CONVERT___S_PRT, return code

  • Error code: InternalError, Http status code: 500 while testing an experiment

    Creating a very simple experiment with just a Dataset, followed by a simple regresion using an Execute R Task , I get an internal server error while testing the published experiment Hitting run everything goes smooth and I can see all data,but when i

  • Where would i get the little screws online for the bottom of my mac?

    i sent my mac to get fixed buy apple over a year ago now most of the screws have come out the bottom and ive lost them? he probly didnt screw them in tight enuff? does anybody know where i can order some online with a little screw driver to?

  • Reporting Doubts

    Hi experts, How to replace a key date variable value with a selection option variable in the query runtime ? And also in the selection option variable is there any chance to fix the selection option to be <= ( Less than or equal to ). Regards, V N.