Query based on a Long Object Datatype

I have a query like this
SELECT project
FROM vgn_ci
WHERE bobdb__val
LIKE '%#8#ObjectID,#7#%'
Over here the the bobdb__val is of type long so it cannot be used with where clause, hence this query won't work. Can anybody provide me a solution.
null

I don't know which version of data base
you are using.
If you have 8i version you can use
Oracle package DBMS_LOB to convert Long to Clob.

Similar Messages

  • SQL Query based BI Pub report - Taking too long to produce the output

    Hi All,
    I was trying to produce a BI Publisher based report through enterprise edition of BI Publisher 10.1.3.4
    Its a sql query based report and it has around 20 columns and it has around 1 lakh records.
    The query actually takes only 2 seconds to execute in the database but when we execute from BI Publisher it takes a long time and also it times out most of the time
    Is there something I am missing in the configuration options ?
    Thanks
    Shasi

    I am facing the same problem as well. I am using the Publisher Web service API to run a report with 1 Million records. This report is configured to use OBIEE. It takes a lot of time to generate the report ( around 30 Mins) and even though OBIEE generates the data, my web service client either timesout. Even after increasing the timeout, a 500 internal server error is thrown . Does anyone know of a solution to this.
    Thanks

  • Implementing History types on query based view object attributes

    Hi All,
    I have to implement the history types
    created on,
    created by,
    modified on,
    modified by
    in my application, but I have all the Query based view objects in my work space, but according to my research History types can only be implemented on the Entity Objects attributes. So how can I do this for my application ? Any Solution ? Any alternative  please ?
    (NOTE: I have all the entity objects available in my common Model work space ).

    @TimoHahn, I have the following master view object query, which i can not generate by using the Entity objects, Basically I am transforming an oracle form base ERP into Oracle ADF application, so I have available all the quries , Please let me know if i can have any alternative solution ?
    SELECT  NVL(A.STYP,0) STYP,A.DAT,C.BATNO,C.ITST, B.DEMNO,B.ITEM,LTRIM(RTRIM(D.ITEMNAME))ITEM_NAME,0 TRINQ,D.UOM ABRV,P.DAT DDAT,
        A.CSNO,PARTY,NVL(CSRAT,0)+(NVL(CSRAT,0)*NVL(B.GST,0))/100 GSTCSRAT,CSRAT,
        A.PDAYS DAYS, DECODE(C.CSTERM,1,'CASH',2,'CREDIT',3,'DD',4,'PAY ORDER',5,'ADVANCE%',6,'CHEQUE') ,B.GST,E.MASTDS PNAME,NVL(SUM(B.RQTY),0)DRQTY,DEPT.SEC_NAME DEPTDS,SUM(STOK.QTY) BAL,P.TRNO,C.EBY, C.SYSIP, C.TDAT
                  FROM ACCSTORE.STAC_CSM A, ACCSTORE.STAC_CSD B,ACCSTORE.ST_STAC_DEM_APRVD C,ACCSTORE.VITEMS D, ACC_MAST E,ACCSTORE.PRE_DEMANDM P,ACCSTORE.VSECTIONS DEPT,
                  (SELECT STYP,ITEMID,SUM(BALANCE) QTY FROM ACCSTORE.VITEMSTOCK GROUP BY STYP,ITEMID) STOK
                  WHERE A.CSNO=B.CSNO AND B.CSNO=C.CSNO AND B.DEMNO=C.DEMNO AND B.ITEM=C.ITEM AND B.STYP=C.STYP  AND C.PDEMNO=P.TRNO(+) AND P.DEPT=DIVNO AND P.SEC_NO=DEPT.SECNO(+)
                              AND C.STYP=STOK.STYP AND C.ITEM=STOK.ITEMID
                    AND C.STYP=D.STYP AND C.ITEM=D.ITEMID AND C.PARTY=E.MASTCD  AND B.APP=1 AND NVL(C.PONO,0)=0 
                    AND C.ITST=DECODE(C.STYP,0,11,14)
                    GROUP BY NVL(A.STYP,0),A.DAT,C.BATNO,C.ITST,B.DEMNO,B.ITEM,D.ITEMNAME,A.CSNO,PARTY,P.DAT,DEPT.SEC_NAME,P.TRNO,C.EBY, C.SYSIP, C.TDAT,
                    CSRAT,A.PDAYS,C.CSTERM,B.GST,E.MASTDS,D.UOM ORDER BY A.CSNO,D.ITEMNAME
    ORDER BY "DAT" DESC
    which i can not generate by using the Entity objects, Basically I am transforming an oracle form base ERP into Oracle ADF application, so I have available all the quries , Please let me know if i can have any alternative solution ?

  • How to access query based view object in backing bean

    Hi
    I am using JDev11.1.2.1.0
    I want to use the query result of query based view object in backing bean.
    How can i do the same
    Please Solve this
    Thanks

    Hi,
    Assuming ADF is in the picture
    1. Create a PageDef file for the page (right mouse click "Go to Page Definition")
    2. In the Executable section, create an iterator for the View Object
    3. In the managed bean:
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    DCIteratorBinding iter = (DCIteratorBinding ) bindings.get("name of Iterator");
    iter.execute();
    // ... navigate the iterator rows ...//
    Frank

  • Migration of LONG and LONG RAW datatype

    Just upgraded a DB from 8.1.7.4 to 10.2.0.1.0. In the post-upgrade tasks, it speaks of migrating tables with LONG and LONG RAW datatypes to CLOB's or BLOB's. All of my tables in the DB with LONG or LONG RAW datatypes are in the sys, sysman, mdsys or system schemas (as per query of dba_tab_columns). Are these to be converted? Or, does Oracle want us to convert user data only (user_tab_columns)?

    USER_TAB_COLUMNS tells you the columns in the tables owned by the current user. There may well be many users on your system that you created that contain objects. I suppose you could log in to each of those schemas and query their USER_TAB_COLUMNS table, but it's probably easier to query DBA_TAB_COLUMNS with an appropriate WHERE clause on the owner of the objects.
    Justin

  • How can i read a stored picture in oracle Long Raw datatype? blob or clob?

    How can i read a stored picture in oracle Long Raw datatype? Like a blob or clob?....i am using jdk 1.3
    This is because...i tried to read it like a blob but i obtain a exception...about Type of column no valid......but the column exist....and it contains the long raw datatype of the pictures.....this is my code:
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.InputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.DriverManager;
    import oracle.sql.BLOB;
    import oracle.sql.BLOB.*;
    import oracle.jdbc.driver.*;
    import java.sql.*;
    class rec_ima1
    public static void main(String h[])
    Connection con = null;
    Blob bl;
    final ImageIcon image1;
    JPanel photo;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    con= DriverManager.getConnection("jdbc:oracle:thin:@123.3.12.213:1521:db_name","user","password");
    String query = "Select * from pictures where ID = '18840'";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery( query );
    if (!rs.next())
    System.out.println("Empty Result Set");
    bl = rs.getBlob(5);
    if (bl == null) {
    System.out.println("Null Blob");
    return;
    InputStream is = bl.getBinaryStream();
    int imageLength = (int) bl.length();
    System.out.println(imageLength);
    System.out.println(bl.length());
    byte[] imageData = new byte [imageLength];
    is.read(imageData, 0, imageLength);
    image1 = new ImageIcon(imageData);
    photo = new JPanel() {
    public void paint(Graphics g){
    g.setColor(Color.lightGray);
    g.drawImage(image1.getImage(), 0, 0, this);
    } catch (Exception e) {
    e.printStackTrace();
    Now i tried using clob:
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.InputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.DriverManager;
    import oracle.sql.CLOB;
    import oracle.sql.CLOB.*;
    import oracle.jdbc.driver.*;
    import java.sql.CallableStatement;
    class rec_ima4
    public static void main(String h[])
    Connection con = null;
    Clob cl;
    JPanel photo;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    con= DriverManager.getConnection("jdbc:oracle:thin:@123.3.12.213:1521:db_name","user","password");
    con.setAutoCommit (false);
    String query = "Select * from pictures where ID = '18840'";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery( query );
    while (rs.next()) {
    oracle.sql.CLOB clob = (CLOB) rs.getObject(5); //line 47
    } catch (Exception e) {
    e.printStackTrace();
    This is the runtime exception:
    java.lang.ClassCastException: [B
    at rec_ima4.main(rec_ima4.java:47)

    Thanks by answering to me......
    Well....i did that....but what is ImageIO?....
    I declared a ImageIcon imageIO, but this give me the following:
    rec_ima3.java:49: cannot resolve symbol
    symbol : class BufferedImage
    location: class rec_ima3
    BufferedImage bi = ImageIO.read(bInput);
    ^
    rec_ima3.java:49: cannot resolve symbol
    symbol : variable ImageIO
    location: class rec_ima3
    BufferedImage bi = ImageIO.read(bInput);
    ^
    What classes i have to import?.....what is ImageIO?
    Thanks

  • Query based on a date range

    I want to query based on a date range. I wrote the following EJB QL:
    "select object(a) from ActionItems as a where a.dueDate
    between ?1 and ?2"
    But when I deployed the application to Oracle's EJB server, I got the following error:
    Auto-deploying biogen.jar (No previous deployment found)... Invalid type for expression (a.dueDate BETWEEN ?1 AND ?2)
    EJB QL statement : 'select object(a) from ActionItems as a where a.dueDate between ?1 and ?2'
    EJB QL method : public abstract java.util.Collection ActionItemsLocalHome.findByDueDateRange(java.sql.Date,java.sql.Date) throws javax.ejb.FinderException
    at com.sun.ejb.ejbql.parser.EjbQLParser.parse EjbQLParser.java:218)
    at com.sun.ejb.ejbql.EjbQLDriver.parse(EjbQLDriver.java:86)
    at com.sun.ejb.sqlgen.SQLGenerator.generateSQLForEjbQLQueries(SQLGenerator.java:704)
    It works fine for a number range, but does not work for a date range.
    Any one has an idea on how to write a correct EJB QL for a query based on date range?
    Thanks.
    Jingzhi

    Re-posted. Please help!

  • How to build a query based on(UNION) 3 vendor InfoObject

    Dear Experts:
    I have a requirement to build one query based on 3 vendor InfoObjct: 0VENDOR + 0VEN_COMPC + 0VEN_PURORG.
    I tried to build a multiprovider upon these 3 infoobjects, but when I Identify(Assign) the key for each InfoObject, supposely there should be 3 InfoObject for me to check (0VENDOR, 0VEN_COMPC and 0VEN_PURORG) so that I can UNION these 3 infoobjects together on vendor number. But since the reference infoobject of these 3 vendor master data is different, I can not check the 3 together.
    Can anybody let me know how to build that query? I only need vendor number show once, and the attributes of 0VEN_COMPC and 0VEN_PURORG can be union to 0vENDOR.
    Any post would be appreciated and thank you all in advance!
    Best Regards!
    Tim

    Hi,
    you can create a link between the vendor objects itself, means link 0vendor with 0ven_compc and 0ven_purorg. This should give you a list of all vendors multiplied with the comp codes multiplied with the purch. org. May be here it is possible to create another link between a attribute (eg. comp_code of 0ven_purorg with comp_code of 0ven_compc). In case it is not possible you need to add this link information somehow. Another option might be to create 2 queries. One on a infoset of 0vendor and 0ven_purorg and another one on 0vendor and 0ven_compc.
    regards
    Siggi

  • Query Based Taxonomy - Dynamic Creation of a Query Problem

    Hi,
    I'm trying to create new category nodes in a taxonomy and to assing them queries. I know how to do this, but I encountered a strange behavior. Here is the situation:
    I have a string property DocumentType. When manualy creating a query, it looks like:
    DocumentType CONTAINS "Some string"
    But when I do the same using code I get:
    DocumentType IS "Some string"
    And as a result of this, the taxanomy is not working properly.
    Here is the code:
         indexService =
         (IIndexService) ResourceFactory
         .getInstance()
         .getServiceFactory()
         .getService(
         IServiceTypesConst.INDEX_SERVICE);
         //        This kind of classification index offers functionality working with query based taxonomies
         qbcIndex = (IQBClassificationIndex) indexService.getIndex(indexId);
         //        Get a query folder - a query folder is a representation of a query based taxonomies category
         queryFolder = qbcIndex.getQueryFolder(RID.getRID(folder));
         //        List of IQueryEntry objects for the query folder
         queryEntryList = queryFolder.getQuery(context);
         //        Cast the IQBClassificationIndex into a ISearchIndex object
         searchIndex = (ISearchIndex) qbcIndex;
         queryEntry = searchIndex.getNewQueryEntry();
         queryEntry.setRowType(IQueryEntry.ROW_TYPE_ATTRIBUTE);
         queryEntry.setPropertyName(propertyName);
         queryEntry.setPropertyOperator(IQueryEntry.PROPERTY_OPERATOR_EQUAL);
         queryEntry.setValue(propertyValue);
         queryEntry.setTermAction(IQueryEntry.TERM_ACTION_EXACT);
         queryEntryList.add(queryEntry);
         //        Set the query for the query folder
         queryFolder.setQuery(queryEntryList, context);
         qbcIndex.updateCategoryContents("Document_Types", false, context);
    Can somebody tell me what am I doing wrong please. Isn't it because of IQueryEntry.PROPERTY_OPERATOR_EQUAL? Is there any substring operator?
    Thanks a lot.

    Hi, Robert
      In this moment, I have a problem with Query Based Taxonomy, maybe could you help me. I insert the query in to the taxonomy from code, but when i use the method
      qbcIndex.updateCategoryContents("/taxonomies/borrame5/Prueba2", false, context);
      I got the next exception:
    #1.5#0014C210F3D1002A000001200000565B000431CC93AD5979#1180654627543#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_17##0#0#Error##Plain###     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)#
    #1.5#0014C210F3D100310000012B0000565B000431CCC47166AB#1180655445698#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_18##0#0#Error##Plain###com.sapportals.wcm.service.indexmanagement.IndexNotReadyException: Some documents are not included in this update because indexing has not been finished yet.#
    #1.5#0014C210F3D100310000012C0000565B000431CCC4717417#1180655445701#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_18##0#0#Error##Plain###     at com.sapportals.wcm.service.indexmanagement.retrieval.trex.AbstractTrexIndex.updateCategoryContents(AbstractTrexIndex.java:2493)#
      I have doubt what parameters i need to pass to the method updateCategoryContents,
      Let me give some information:
    taxonomy:
       /taxonomies/borrame5/Prueba2
    repository:
       /documents/Portal_KOF/KM/Pruebas1/Pruebas Versionamiento
    classification and search index:
       borrame5
       I can't classify automatically, when i insert the query from code. When I manually insert the query from the portal, automatic classification run perfectly.
    Thanks
    Greetings
    JARO.

  • Query CTS takes a long time

    Our team are working on a query CTS, But Query Transport takes a long time in product system.
    Any suggestions?

    Hi Hite, While you drag & drop the 'Query' object on right pane of the CTS; You can find 2 check boxes under it. One is the 'Query Elements' & other the 'InfoProvider'. You may only need to transport the 'Query Elements' & not the Cube/DSO. Some reasons why query may not be transported is like your query may have a lot of cells/restrictions/filters. I guess data part is not dependent on the query size/time taken to transport, as the query is basically a set of BI objects which restrict/filter; give some conditions/exceptions etc. Possibly, you may check if there exists any dependent objects for your query like BEx Workbooks, WAD web templates & reports; If so you may just transport the query only. In STMS, if the transport request is not imported; then you may check the warnings about the missing elements/objects dependent on your base query. Thanks!

  • Query on Cube jumps to Query on ODS ; Query on ODS takes Long time

    Hi All,
    Perormance Issue:  Query on Cube jumps to Query on ODS.
    Query on ODS taking long time.(JumpQuery)  
    Specific to ODS Query: When i have checked the Query on ODS(individually) also taking longer time
    Actually ODS contains quite huge data. Indexes already maintained.
    I have checked the RSRT- Execute SQL and Debug Option also. Indexes maintained Perfectly .
    Order of objects in ODS indexes are matching the order of Objects in SQL stat of RSRT Trans. Inspite of that taking long time.
    I have checked both the ways jumpquery aswellas individually .
    My question is when the query is jumping from cube to query on ODS how to check the performance, how the query is executing in background when switching over to the second query, Moreover calculated keyfigure has been used for jumping to the target query.
    How can query(ods query)  time is optimized or improve performance when jumping  from query on Cube ?
    can any body help?
    Rgds,
    C.V.
    Message was edited by:
            C.V. P

    What i understand is that you need to optimise the Query jumping time . But this will be very less compared to the time taken by the query on the ODS.
    Ideally you shouldnt be making a BEx Query on the ODS , as this takes a long time. What you can do is try executing the Bex Query on the ODS to find out as to where the issue lies. If this query is taking a long time , there is not muich that you can do here.

  • Creating a dynamic Selection List based on a View Object

    Hello,
    I'm new to JDeveloper and I would like to create a JSP Page with dynamic Selection List based on a runtime query or based on a view object (BC4J). The selection made by an user should serve another dynamic query with the necessary parameters that I built using createViewObjectFromQueryStmt(). By now I tried this using the InputSelectLOV from the Component Palette in JDeveloper. But without success. By the way: the selection list is not very large (5 values), so it's not necessary to have a form finding the desired value.
    Maybe someone had experience about creating this already. Please give me a tip or a little example.
    Thanks.

    http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html

  • Documents in Query-based Taxonomy are not Autoindexing

    Hello experts!
    I am on EP6.14 with Trex 6.  I have a repository with a query-based taxonomy on it and is also part of a regular search index.  I have autoclassification on. 
    On each document I have a couple of properties that are used to match documents in queries in my taxonomy.  On the initial set-up and load, everything worked great.  Documents went right where they were supposed to.  But sometime after we released this to the business, the documents no longer automatically index.  If I change a document property or set up a new one, it finds the category but leaves them as "suggested."  You then have to go in and accept those suggestions to get the document to the right taxonomy.  In short, it acts as if autoclassification is off.  I have noticed that the Classification index does not submit a new document if I change a property but the search index does.  Not sure if that is applicable but I would think both should do that since it is a change.
    I did some research and found that synchronization issues or new folders could cause this problem but I have synchronized with no success.  Also, state management is not on for the repository.
    Is there any reason why autoclassification would stop on its own?  What can I do to get it back on?
    Thanks-
    J
    Many points given for helpful answers!

    Hi Frederick-
    Thanks for your response-
    We have a single CM DB repository.  There is a search only index at the root folder and classification index on a folder below the root.  Normally, we don't overlap but we wanted only the folders in the lower folder to be part of the taxonomy.  I suppose we could just rule out the other documents by not having them match any queries but this way it was guaranteed. 
    THe search and classifications are working (aren't throwing errors) but like I said, I would think that both would have to push the document through the queue.  But I'm only seeing the search index do that.   Now if I go and accept the recommended categories, then it goes into the queue for the Classification index.
    J

  • Query based on date

    Have you guys ever tried to write a query based on CMP?
    The EJB QL is:
    select object(a) from ActionItems as a where a.duedate = ?1
    When I deployed it to OC4J, I got the following error:
    Error compiling D:\oc4j903\j2ee\home\applications\biogen/biogen.jar: Error trans
    lating EJBQL: Invalid type for expression (a.dueDate = ?1)
    EJB QL statement : 'select object(a) from ActionItems as a where a.dueDate = ?1'
    EJB QL method : public abstract java.util.Collection ActionItemsLocalHome.findByDueDate(java.sql.Date) throws javax.ejb.FinderException
    Auto-deploying file:/D:/oc4j903/j2ee/home/applications/biogen/biogen/ (Assembly
    had been updated)...
    So, any query that is based on date will not work for OC4J, is this a bug or what?
    Thanks for the reply.
    Jingzhi

    I would post this question (and your date range question) to the J2EE group. More J2EE/EJB specific questions are answered there.
    To my understanding the standard ejb2.0 specification is weak in date comparisons for queries. I believe you need to add your date queries to your application server specific orion-ejb-jar.xml file. I'm not sure of how, I would post that question to the J2EE forum, or look it up in the 9ias documentation.
    -Mark

  • Query based on permission

    Does anyone know if there's a way to query for group (or any other object) based on the current user's permission?  For instance, if I wanted to retrieve all of the groups to which the current user has read access?
    If not, is there a way to retrieve the current user's access level for each object in the query?  So for instance, in addition to returning the group name and group id, also return the user's level of access.
    Thanks a lot!

    Read the documentation:
    http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001252.htm
    page1.html
    <form id="form1" name="form1" method="post"
    action="page2.cfm">
    <label>enter id <input type="text" name="textfield"
    />
    </label>
    </form>
    page2.cfm
    <cfquery name="foo" datasource="bar">
    SELECT aField, bField, cField
    FROM aTable
    WHERE aField = <cfqueryParam value="#form.textfield#"
    cfsqltype="cf_sql_varchar">
    </cfquery>
    <cfoutput query="foo">
    #aField# #bField# #cField#
    </cfoutput>
    briankind wrote:
    > query based on a test input box
    >
    > hi
    > i have this html input box and i want to output a query
    based on what i put in
    > the input box. what should i do now.
    >
    > thanks
    >
    >
    > <form id="form1" name="form1" method="post"
    action="">
    > <label>enter id <input type="text"
    name="textfield" />
    > </label>
    > </form>
    >

Maybe you are looking for

  • Two boots for OS? (Something about kernel)

    I have the latest generation Mac Pro with customized built, 1x 3.33gHz 6-core and 8 Gig of RAM. Here's something strange happened to me lately... about two weeks ago, the OS X will not load during the first boot. I have mine set at verbose mode so I

  • Video clips on N80

    Hi, i recently got an n80 and since the 1st day i been trying to watch online videos. For example www.bbc.co.uk/news offers short clips specifically for mobiles, but when i try to play them i only see a little icon with a boat on it so i assume its n

  • Business rule, runtime prompt problem

    Hi Gurus, We have one business rule which contain run time prompt where global variable assigned to it, when I run the rule form workspace I would able see all numbers from prompt window But when I run the same from Excel Smartview, I couldn't able t

  • Post - RCU installation

    Hi, As a pre-requisite for the webcenter suite(Portal,Webcenter,Content Server) I had installed the corresponding schemas in Oracle Database 11G. As its a requirement to compile the packages MDS_INTERNAL_COMMON ,MDS_INTERNAL_SHREDDED and MDS_INTERNAL

  • C# copy directory at push of a button

    ok for all my loose files like exe programs and couple of folders is there a way easy way to copy a folder to another directory  been trying to copy a folder form this directory  ‪C:\ProgramData\elfen_launcher\FLEXLM to C:\  but no matter what i do i