10g BC4J bug in alias query column

something strange ... i created some view's in expert mode and gave the result set aliases to replace the expression used in the select clause (select expression "Alias" from ...). The alias was mixedcase like in the parenthesis. After creating two view's i created a view link using both attributes (transient attributes resulting from the expression). All seem to were fine but i have got an error when testing the application module where the view's was integrated. The error said that the "Alias" was not recognize. Changing the alias to "ALIAS" (in uppercase) resolved the problem.

Forgot to mention why this is a problem:
If I can't change the alias, the queries look 'confusing', because the default alias is the name of the base entity. So the query becomes:
SELECT ...
FROM Derived BASE
This is confusing.

Similar Messages

  • 10g BC4J bug

    It is not possible to remove a transient attributes in a view created with expert mode. although the wizard remove the attribute from the list box using the left arrow button the attributes still in the view and come back after appying the changes (apply button).

    Sorted. You have to execute jdevw.exe not jdex.exe
    My mistake.

  • Alias the column name

    Hi all,
    I want to alias the column name form Location to "Location Name".
    say for example:
    select location_name as Location Name from Location_table;
    i know that the above query will give erroe.
    here initially my column name is Location_name, but i want is "*Location Name*".
    (there should be a space in between the two words)
    Can anybody help me?
    Thanks in advance,
    Vinay

    select location_name as "Location Name" from Location_table;- Mahesh Kaila

  • Bug report - OOB site column ArticleStartDate is crawled according to GMT0 not user/server timezone

    This issue can be reproduced easily on any SP2013 farm (on-premise) and I heard Sharepoint online do not have this problem.
    Issue: Site column "Article Date" with fieldname "ArticleStartDate" is crawled as GMT 0 regardless what timezone your web application, site setting, user setting and OS are set. Also when you submit a search you need to use GMT 0
    otherwise you will get wrong result. I believe it is bug because other datetime columns like "Modified" have handled timezone issue very well.
    To reproduce: On a SP2013 farm (on-premise), check your timezone settings (in my environment it is GMT+8). Then create a site collection and enable its Publishing Infrastructure feature. Then you will see some site columns are setup including "Article
    Date" (field name "ArticleStartDate"). Now create a custom content type and add some columns including "Article Date" to it. Create some sample items using the custom content type and remember fill in the value for "Article Date".
    By default it should allow you pick a "Date" only. After save the change you should see "Article Date" is saved like "2014-06-18 00:00:00" if check with powershell.
    After create some sample items start a full crawl. You will see find two crawled property "ows_q_DATE_ArticleStartDate" and "ows_ArticleStartDate" appear in Search Service Application -> Search Schema. There are some existing managed
    properties mapping to those crawled properties like "ArticleStartDateOWSDATE" (which is TEXT datatype).
    Here you can create some new managed property or use existing. Apply search using those properties to test. In my lab, I created "NewsArticleDate" as managed property and mapping to ows_ArticleStartDate. Then I create a blank
    page and add a "Search result" and "refinement panel" webpart and start some search. In the refinement panel added in the managed properties setup in previous steps. In the querystring I typed in something like /search.aspx?k=newsarticledate=YYYY/MM/dd
    It is what I see:
    1. As you can see in the refinement panel, because I am at GMT+8 and crawled index at GMT 0, the sample data "2014-06-18 00:00:00" will become "2014-06-17 16:00:00".
    2. Hence, in order to search out "2014-06-18 00:00:00"  item I have to input "2014-06-17" in search query! (in SP2013 the time part are ignored)
    3. By using the powershell provided by Ivan Josipovic (http://gallery.technet.microsoft.com/office/Get-Crawled-Property-names-9e8fc5e0), I can see the items
    ows_ArticleStartDate is "2014-06-18 00:00:00".
    I hope it is actually not a bug. Please let me know if my setting is wrong. Thank you!

    Hi Mark,
    According to your description, my understanding is that the Article Date column displayed with the value based on GMT0 in the Refinement web part.
    Microsoft SharePoint stores date and time values in Coordinated Universal Time (UTC, but also named GMT or Zulu) format, and almost all date and time values that are returned by members of the object model are in UTC format. So the value
    of the Article Date column stores the date and time in UTC format in the database, and the search indexes the UTC value of the Article Date column after crawling the database so that it displays the UTC value in Refinement web part.
    The list column values displayed in the lists that are obtained through the indexer for the SPListItem class are already formatted in the local time for the site so if you’re working on current context list item and fetch a datetime field
    like so SPContext.Current.ListItem["Your-DateTime-Field"] you’ll retrieve a DateTime object according the specified time zone in the regional settings.
    More references:
    http://francoisverbeeck.wordpress.com/2012/05/24/sharepoint-tip-of-the-day-be-careful-when-wor/
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • BEx Query Columns come back in different Order after drill?

    I have a strange effect when I work with BEx Queries in Xcelsius.
    On default, I open and display the Bex Query "A". Columns are in order like defined in BEx Designer (Column1, Column2, Column3.....)
    I want to do a drill, and so in Xcelsius BEx Connection settings I set the Filter on Field "X" in the XLS and in "Query Usage" I addionally apply the setting "Refresh when Trigger Cell "X" changes".
    Starting the report works fine. But when I do the drill and the Query refreshes, the BEx Query Columns come back in different order?!?
    It looks as if Column 2 and Column 3 are exchanged.
    How can I fix that?
    Thx,
    B. Wegner

    After some testing....
    This issue is independent from the filter value. But it only seems to occure when a second BEx Query connection is defined.
    The BEx Query Data Columns come back in different order after
    - Refresh on Trigger
    - Refresh after XY Seconds
    Any Ideas?
    Edited by: B.Wegner on Nov 16, 2010 3:42 PM

  • Oracle 10g Diff in execution plan query with binding var Vs without

    We recently did 10g upgrade. In 10g, execution plan differs for query with binding var(thru jdbc etc) Vs without it as given below. For query with binding var,
    it chooses poor execution plan(no index is used, full scan is done etc). everything worked fine in 9i. To rectify the problem, we have to hint query with right index,join etc. but i dont like this solution.
    I would rather prefer to correct database to choose right execution path instead of eacy query level. but not sure what causes the issue.
    Does anybody came across this issue? if so, Please share your experiences. Thanks for the help. Do let me know if you need more info.
    1. Query without binding bar:
    select * from test where col1 = :1 and col2 = :2
    1. Query without binding bar:
    select * from test where col1 = 'foo' and col2= 'bar'

    I am not an expert but in my humble opinion it is the developer's responsability to ensure the correct explain plan is used before deploying code to production, if the explain plan returned by the DB is bad, then the use of a hint is perfectly acceptable.
    Check this out: http://lcgapp.cern.ch/project/CondDB/snapshot/performance.html
    Excerpt:
    Bind variable peeking. If an SQL query contains bind variables, the optimal execution plan may depend on the values of those variables. When the Oracle query optimizer chooses the execution plan for such a query, it may indeed look at the values of all bind variables involved: this is known as "bind variable peeking".
    In summary, the execution plan used for a given SQL query cannot be predicted a priori because it depends on the presence and quality of statistics and on the values of bind variables used at the time the query was first executed (hard-parsed). As a consequence of this instability of execution plans, very different performances may be observed for the same SQL query. In COOL, this issue is addressed by adding Oracle hints to the queries, to make sure that the same (good) plan is used in all cases, even with unreliable statistics or unfavourable bind variables.
    Edited by: Rodolfo Ferrari on Jun 3, 2009 9:40 PM

  • Aggregates in Query Columns of a Web Database

    What Aggregates expressions are not allowed in Query Columns context of a web database

    Hi,
    As this post is more related to SQL, I suggest you post a question in SQL forum.
    More experts will help you find the solution and you will get more information from there.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?category=sqlserver
    Best regards,
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • Query help - Using Alias in column equation

    Hi All,
    I have selected some data as an alias and would like to refer to the alias in another equation column. I cannot figure out how to do this correctly.
    Here is my full query below, with a NULL called '3 Mnth Average' column because I am unsure how to reference the Alias and data type correctly for the required equation.
    For example, I want to return the '3 Mnth Average' result being the '3 Mnth Total' Alias divided by 3.  ('3 Mnth Total'  / 3).... Every time I try... i fail.
    Any help would be most appreciated.
    Best regards,
    John
    SELECT T0.ITEMCODE, T0.ITEMNAME,
    Cast((T0.ONHAND - T0.IsCommited) As INT) As 'Available',
    Cast(T0.ONHAND As INT) As 'In Stock', Cast(T0.IsCommited As INT) As 'Committed',
    Cast((SELECT SUM(T1.[Quantity]) FROM INV1 T1 WHERE T1.ITEMCODE = T0.ITEMCODE
    AND DATEPART(mm,T1.[DocDate])  >= DATEPART(mm,getdate())-3
    AND DATEPART(mm,T1.[DocDate]) <= DATEPART(mm,getdate())) As INT) As '3 Mnth Total',
    (NULL) As '3 Mnth Average',
    CAST ((SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 1 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) As INT) AS 'JAN QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 2 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'FEB QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 3 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'MAR QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 4 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'APR QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 5 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'MAY QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 6 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'JUN QTY',
    CAST ((SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 7 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) As INT) AS 'JUL QTY',
    CAST ((SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 8 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS INT) AS 'AUG QTY',
    CAST ((SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 9 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) As INT) AS 'SEP QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 10 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'OCT QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 11 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'NOV QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 12 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'DEC QTY'
    FROM dbo.OITM T0
    LEFT JOIN dbo.INV1 T1 ON T1.ItemCode = T0.ItemCode
    WHERE T0.SellItem = 'Y'
    GROUP BY T0.ItemCode, T0.ItemName, T0.OnHand, T0.IsCommited, YEAR(T1.DOCDATE)
    HAVING YEAR(T1.DOCDATE) = YEAR(GETDATE())
    ORDER BY T0. ITEMCODE

    Hi John,
    If you are not using temporary table, you have to rewrite complete formula to get 3 month average. There is no way to reference within the same query.
    Thanks,
    Gordon

  • Times ten not showing the column alias as column header in select query.

    Hi All,
    I am trying to execute following queries on TimesTen database 11.2.2.2.0.
    SELECT ROWNUMBER,
    floor((to_date(TO_CHAR(SYSDATE,'YYYY-MM-DD hh24:mi:ss'), 'YYYY-MM-DD hh24:mi:ss')-to_date(TO_CHAR(starttime,'YYYY-MM-DD hh24:mi:ss'), 'YYYY-MM-DD hh24:mi:ss'))*24)
    || 'h '
    || mod(floor((to_date(TO_CHAR(SYSDATE,'YYYY-MM-DD hh24:mi:ss'), 'YYYY-MM-DD hh24:mi:ss')-to_date(TO_CHAR(starttime,'YYYY-MM-DD hh24:mi:ss'), 'YYYY-MM-DD hh24:mi:ss'))*24*60),60)
    || 'm '
    || mod(floor((to_date(TO_CHAR(SYSDATE,'YYYY-MM-DD hh24:mi:ss'), 'YYYY-MM-DD hh24:mi:ss')-to_date(TO_CHAR(starttime,'YYYY-MM-DD hh24:mi:ss'), 'YYYY-MM-DD hh24:mi:ss'))*24*60*60),60)
    || 's' TIME_DIFFERENCE
    FROM
    (SELECT ROW_NUMBER() OVER (ORDER BY USERIDENTITY DESC) ROWNUMBER,
    u.*
    FROM TBLMCORESESSIONS u
    WHERE 1=1
    ) B
    WHERE ROWNUMBER BETWEEN 1 AND 5
    and I am getting the follwing output.
    ROWNUMBER,
    < 1, 8h 52m 34s >
    < 2, 8h 54m 24s >
    < 3, 8h 54m 13s >
    < 4, 8h 55m 6s >
    < 5, 8h 54m 40s >
    The issue is I should get TIME_DIFFERENCE as column header but it is not showing TIME_DIFFERENCE as the column header & it is calculating the value just fine .
    & if same query I execute on oracle 11g database every thing works fine.
    please suggest me something that column header is must.
    or suggest me any other for query
    Edited by: hiaditya04 on Apr 24, 2012 11:05 AM

    Hi,
    It is similar to bug which is raised in Timesten 11.2.2.2.. BUG 13896607 - COLUMN NAME MISSING FROM A VIEW IN TIMESTEN 11.2.2.2 . If you have MOS access then you can view about this bug. The bug is going to be fix in the future release. The bug basically indicates that we are not displaying the column name properly when select list contains complex expressions. The column itself can be accessed and values are displayed correctly.
    Regarding your issue "column TIME_DIFFERENCE not found" , I would suggest you to access the column by position, not by name like below
    I believe you are trying to access your column like below
    resultset.getString(“TIME_DIFFERENCE”)
    Instead of this you can use : -- resultset.getString(2) ( this position should based on the position of the column you are using in the query)
    Hope this helps.
    Regards
    Rajesh

  • JPA Problem using alias for columns in a query

    Hello, I am having some problems with a query that I am trying to use in my JEE project. This query doesnt return an entity but a group of values. I created a class representing the result and a query with the jpa constructor expression but it is not working.
    The problem is that in the query I added some alias to the results, and when I try to run the project it says that it cannot parse the query.
    My Query:
    Query query = em.createQuery("SELECT NEW vo.VOOperacionesAgrupadas (o.nemotecnico as nemotecnico, o.esCompra as esCompra, i.equivUltimo as equivUltimo, sum(o.saldo) as saldo, sum(o.utilidad) as utilidad, sum(o.tasaCompraVenta)/count(o.nemotecnico) as promedioTasaCompra, (i.equivUltimo-sum(o.tasaCompraVenta)/count(o.nemotecnico))*100 as puntosBasicos) FROM Operaciones o, Instrumentos i WHERE o.idUsuario = :idUsuario AND o.nemotecnico = i.nemotecnico AND o.estaCerrada = 'false' Group by o.nemotecnico, o.esCompra, i.equivUltimo"); When I use that the server returns :
    Exception Description: Syntax error parsing the query [SELECT NEW vo.VOOperacionesAgrupadas (o.nemotecnico as nemotecnico, o.esCompra as esCompra, i.equivUltimo as equivUltimo, sum(o.saldo) as saldo, sum(o.utilidad) as utilidad, sum(o.tasaCompraVenta)/count(o.nemotecnico) as promedioTasaCompra, (i.equivUltimo-sum(o.tasaCompraVenta)/count(o.nemotecnico))*100 as puntosBasicos) FROM Operaciones o, Instrumentos i WHERE o.idUsuario = :idUsuario AND o.nemotecnico = i.nemotecnico AND o.estaCerrada = 'false' Group by o.nemotecnico, o.esCompra, i.equivUltimo], line 1, column 53: syntax error at [as].
    Internal Exception: MismatchedTokenException(8!=82)
    GRAVE: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
    Exception Description: Syntax error parsing the query [SELECT NEW vo.VOOperacionesAgrupadas (o.nemotecnico as nemotecnico, o.esCompra as esCompra, i.equivUltimo as equivUltimo, sum(o.saldo) as saldo, sum(o.utilidad) as utilidad, sum(o.tasaCompraVenta)/count(o.nemotecnico) as promedioTasaCompra, (i.equivUltimo-sum(o.tasaCompraVenta)/count(o.nemotecnico))*100 as puntosBasicos) FROM Operaciones o, Instrumentos i WHERE o.idUsuario = :idUsuario AND o.nemotecnico = i.nemotecnico AND o.estaCerrada = 'false' Group by o.nemotecnico, o.esCompra, i.equivUltimo], line 1, column 53: syntax error at [as].
    Internal Exception: MismatchedTokenException(8!=82)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: Exception [EclipseLink-8024] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.JPQLException
    Exception Description: Syntax error parsing the query [SELECT NEW vo.VOOperacionesAgrupadas (o.nemotecnico as nemotecnico, o.esCompra as esCompra, i.equivUltimo as equivUltimo, sum(o.saldo) as saldo, sum(o.utilidad) as utilidad, sum(o.tasaCompraVenta)/count(o.nemotecnico) as promedioTasaCompra, (i.equivUltimo-sum(o.tasaCompraVenta)/count(o.nemotecnico))*100 as puntosBasicos) FROM Operaciones o, Instrumentos i WHERE o.idUsuario = :idUsuario AND o.nemotecnico = i.nemotecnico AND o.estaCerrada = 'false' Group by o.nemotecnico, o.esCompra, i.equivUltimo], line 1, column 53: syntax error at [as].
    Internal Exception: MismatchedTokenException(8!=82)
    at org.eclipse.persistence.exceptions.JPQLException.syntaxErrorAt(JPQLException.java:362)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.handleRecognitionException(JPQLParser.java:304)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.addError(JPQLParser.java:245)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.reportError(JPQLParser.java:362)
    at org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.recoverFromMismatchedElement(Unknown Source)
    at org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(Unknown Source)
    at org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.mismatch(Unknown Source)
    at org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.match(Unknown Source)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.constructorExpression(JPQLParser.java:2635)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.selectExpression(JPQLParser.java:2045)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.selectItem(JPQLParser.java:1351)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.selectClause(JPQLParser.java:1266)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.selectStatement(JPQLParser.java:352)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.document(JPQLParser.java:276)
    at org.eclipse.persist
    GRAVE: ence.internal.jpa.parsing.jpql.JPQLParser.parse(JPQLParser.java:133)
    at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.buildParseTree(JPQLParser.java:94)
    at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:198)
    at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:173)
    at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:125)
    at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:109)
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1326)
    ... 59 more
    Caused by: MismatchedTokenException(8!=82)
    ... 74 more
    What can I do?? I have been stuck in this problem for 2 weeks :s I have tried almost everything..
    Thanks in advance for your help!

    SELECT tmp.contract_no, tmp.Actual, tmp.Actual - tmp.NbHours
    FROM ( SELECT t.contract_no, sum(l.hrs) AS Actual, (c.labour_hours * c.labour_progress_per) / 100 AS NbHours
    FROM TASK_DELEGATION t
    INNER JOIN COST_CODE c
    ON t.cost_code = c.cost_code AND t.contract_no = c.contract_no AND t.is_inactive=0
    INNER JOIN Labour.dbo.LABOURALLOT l
    ON l.contractNo = c.contract_no AND l.costcode = c.cost_code AND l.pm = 'N'
    GROUP BY t.contract_no, c.labour_hours, c.labour_progress_per
    ) tmp

  • BC4J: bug query generator

    Hi,
    We want to use a certain name for a table in our database. Unfortunately this name is protected. To circumvent this problem we created the table with the name between quotes (e.g. "table"). This works fine at the database level.
    If we add the table to a BC4J package using JDeveloper an entity with the right name (e.g. Table) is created. Unfortunately this name is used by default as a synonym to query the table (e.g. SELECT * FROM "table" Table). Fortunately for normal select statements you can change this by editing the view object and renaming the default synonym to something else (e.g. SELECT * FROM "table" t).
    But... when you try to remove a row BC4J still uses the default synonym to first lock the record and then delete the record. Unfortunately there seems to be no way to change the default table synonym of a certain entity. Or is there a way?
    Regards,
    Peter

    I've found a way to circumvent the problem. Although normally it's not possible (in the JDeveloper GUI) to enter an alias for a certain entity, it is possible when you edit it's XML file. If you change the attribute AliasName to a valid alias everything works fine!

  • Querying external tables ERROR no not English version 10g R2 ¿BUG 5172459?

    Hello
    I have a serious problem when trying to view the content of external tables under Oracle 10R2 in Spanish
    Steps to perform:
    1. Make directory on file system (in oracle server side).
    2. Copy a data file into this directory.
    3. Login (sqlplus) as "sys as sysdba"
    4. Make one oracle directory object
    5. Grant permits read / write to a user 'simple_uesr'
    6. Logout sys, and login as 'simple_user'
    7. Make a external table, which uses the directory and data file.
    8. Run query 'select * from myExtTable' to check it.
    I have repeated these steps on Oracle 9i Enterprise, Oracle 10gR2 Enterprise, and Oracle 10g XE, and always, always worked perfectly (no problems).
    The problem occurs in the client's DB (Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 SPANISH), everything works fine until the step 8 (querying external tables), where systematically the following error occurs:
    ERROR en línea 1:
    ORA-29913: error al ejecutar la llamada de ODCIEXTTABLEOPEN
    ORA-29400: error de cartucho de datos
    KUP-00552: internal XAD package failed to load
    ORA-06512: en "SYS.ORACLE_LOADER", línea 19
    I have made many tests, such as assigning a wrong directory to external table, remove the data file, remove access permissions, and always, always gives the same error, nerver error "file not found...etc, etc".
    I have concluded that the failure, which occurs before Oracle even try to access the file system, but I do not know what may be the cause.
    Searching the Internet, I found the following links:
    http://www.dba-oracle.com/t_ora_29913_external_table_error.htm
    http://zalbb.itpub.net/post/980/249423
    Where mention the BUG 5172459 (MetaLink Note: 373168.1), but after follow the directions, still does not work.
    Can anyone help me with this problem?
    Thanks!
    Full details of the DB which gives the error
    SO: Windows 2003 Server Standard SP1.
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
    PL/SQL Release 10.2.0.2.0 - Production
    CORE 10.2.0.2.0 Production
    TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
    show parameter nls;
    NAME TYPE VALUE
    nls_calendar string
    nls_comp string
    nls_currency string
    nls_date_format string
    nls_date_language string
    nls_dual_currency string
    nls_iso_currency string
    nls_language string SPANISH
    nls_length_semantics string BYTE
    nls_nchar_conv_excp string FALSE
    nls_numeric_characters string
    nls_sort string
    nls_territory string SPAIN
    nls_time_format string
    nls_timestamp_format string
    nls_timestamp_tz_format string
    nls_time_tz_format string
    -- NLS_SESSION_PARAMETERS
    select * from NLS_SESSION_PARAMETERS order by parameter;
    PARAMETER VALUE
    NLS_CALENDAR GREGORIAN
    NLS_COMP BINARY
    NLS_CURRENCY €
    NLS_DATE_FORMAT DD/MM/RR
    NLS_DATE_LANGUAGE SPANISH
    NLS_DUAL_CURRENCY €
    NLS_ISO_CURRENCY SPAIN
    NLS_LANGUAGE SPANISH
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NUMERIC_CHARACTERS ,.
    NLS_SORT SPANISH
    NLS_TERRITORY SPAIN
    NLS_TIME_FORMAT HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF
    NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR
    NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
    -- NLS_INSTANCE_PARAMETERS
    select * from NLS_INSTANCE_PARAMETERS order by parameter;
    PARAMETER VALUE
    NLS_CALENDAR
    NLS_COMP
    NLS_CURRENCY
    NLS_DATE_FORMAT
    NLS_DATE_LANGUAGE
    NLS_DUAL_CURRENCY
    NLS_ISO_CURRENCY
    NLS_LANGUAGE SPANISH
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NUMERIC_CHARACTERS
    NLS_SORT
    NLS_TERRITORY SPAIN
    NLS_TIME_FORMAT
    NLS_TIMESTAMP_FORMAT
    NLS_TIMESTAMP_TZ_FORMAT
    NLS_TIME_TZ_FORMAT
    -- NLS_DATABASE_PARAMETERS
    select * from NLS_DATABASE_PARAMETERS order by parameter;
    PARAMETER VALUE
    NLS_CALENDAR GREGORIAN
    NLS_CHARACTERSET WE8MSWIN1252
    NLS_COMP BINARY
    NLS_CURRENCY ?
    NLS_DATE_FORMAT DD/MM/RR
    NLS_DATE_LANGUAGE SPANISH
    NLS_DUAL_CURRENCY ?
    NLS_ISO_CURRENCY SPAIN
    NLS_LANGUAGE SPANISH
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NUMERIC_CHARACTERS ,.
    NLS_RDBMS_VERSION 10.2.0.2.0
    NLS_SORT SPANISH
    NLS_TERRITORY SPAIN
    NLS_TIME_FORMAT HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF
    NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR
    NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
    END.

    jpadron_uy wrote:
    ERROR en línea 1:
    ORA-29913: error al ejecutar la llamada de ODCIEXTTABLEOPEN
    ORA-29400: error de cartucho de datos
    KUP-00552: internal XAD package failed to load
    ORA-06512: en "SYS.ORACLE_LOADER", línea 19Hola!
    Let's go through errors you posted:
    First error (ORA-29913) indicating error occurs when Oracle tryed to access external table.
    Then ORA-29400 says that error has occurred in a data cartridge external procedure.
    And then finally KUP-00552 - an error was encountered while attempting to initialize the XAD package.
    So did you check state of the XAD package in that database?
    Also, please post code you used in steps 4. and 7.
    HTH

  • Interactive Report BUG (hangs when sorting columns)

    Hi All,
    i have an interactive report, and when i click on a column to sort the data the report hangs.
    To circle in the screen keeps circeling and on the botom and i get an javascipt error in the apex_3_1.js file.
    i am working with apex 3.2.1.00.02 with an oracle 10G DB.
    I also can reporduce this error. When i have an interactive report in which the sorting works properly and i copy this page to a new page i get a report in which the interactive report sorting is not working.
    Can you please help me in resolving the issue, or is this a known bug ?
    Regards,
    Marco Schlicher

    Hello,
    I came across the same issue. I made a test IR report with the following query
    SELECT '<span class="blue">'||id||'</span>'||name as n_name, id
    FROM
    +(SELECT ''||fullname||'' name, id from users)+
    It all works fine on FF but IE returns this
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; InfoPath.2; AskTB5.5)
    Timestamp: Wed, 5 May 2010 07:53:11 UTC
    Message: Unknown runtime error
    Line: 1
    Char: 9270
    Code: 0
    URI: http://localserver/i/javascript/apex_3_1.js
    Using the IE debugging tool, error occurs upon this
    function $dom_AddTag(E,A,C)
    +{+
    var D=document.createElement(A);
    var B=$x(E);
    +if(B){B.appendChild(D)}+
    +if(C!=null){D.innerHTML=C}+
    return D}
    It all works fine if I remove the <a href... tag...But I need it and I can't use the column properties since it's quite a huge list of if's for the link creation.
    Thanks,
    Andrea

  • BC4J bug with "bind variables" JBO-27122 ORA-01008

    I think we are found a BUG using BC4J with bind variables in a view object.
    If the bind variable appear in the WHERE condition two or more times at
    the beginning of the query the above error occur.
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement:
    SELECT Emp.EMPNO,Emp.ENAME,Emp.JOB,Emp.MGR,Emp.HIREDATE,Emp.SAL,Emp.COMM, Emp.DEPTNO
    FROM SCOTT.EMP Emp
    WHERE :1 <=10000 and :1 <= sal and :2=20
    java.sql.SQLException: ORA-01008: not all variables bound
    Otherwise if bind variable apper two or more times, but not together
    like this sample:
    WHERE :1 <=10000 and :2=20 and :1 <= sal
    the error not occur.
    We prove this with:
    JDeveloper 9.0.5.2 (build 1618)Business Components Version 9.0.5.16.0
    JDeveloper 9.0.5.0 (build 1375)Business Components Version 9.0.5.13.52
    I looking for a patch! or acceptable workaround.
    Tx for your help!
    diego.
    /* the cliente app */
    ApplicationModule am = Configuration.createRootApplicationModule("business_tier.AppModule","AppModuleLocal");
    ViewObject vo = am.findViewObject("EmpView");
    vo.setWhereClauseParam(0,"100");
    vo.setWhereClauseParam(1,"20");
    Row emp = vo.first();

    This is a known bug (1326006). The workaround is to use:
    vo.setWhereClauseParam(0,"100");
    vo.setWhereClauseParam(1,"20");
    vo.setWhereClauseParam(2,"20");
    Hope this helps,
    Lynn
    Java Tools Team

  • Problem with column alias: Unknown column 'avg_rating' in 'where clause'

    Hello,
    I have a basic sql statement as follows:
    SELECT
    e.establishment_id,
    e.establishment_name,
    avg(r.rating) avg_rating
    FROM
    establishment e,
    rating r,
    comment com,
    establishment_country ec,
    country_ref cou
    where
    etc...
    and avg_rating >= 1
    and 0=0
    group by e.establishment_id
    order by e.establishment_idI have used a column alias for "avg(r.rating)" and named it "avg_rating".
    It works in my Mysql Query browser without problem but when I run it from Java I get this:
    java.sql.SQLException: Unknown column 'avg_rating' in 'where clause'
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:824)
        at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:145)
        at arcoiris.SearchSessionBean.performSearch(SearchSessionBean.java:73)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
        at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
        at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
        at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
        at org.jboss.ejb.Container.invoke(Container.java:873)
        at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
        at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
        at $Proxy172.performSearch(Unknown Source)
        at arcoiris.SearchManagedBean.performSearch(SearchManagedBean.java:171)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
        at javax.faces.component.UICommand.broadcast(UICommand.java:312)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)Can anyone help please?
    Thanks in advance,
    Julien Martin.

    I am having the similiar problem, the query in java creator IDE works fine after i upgraded the J-connector and changed DataSource type for MySQL to mysql-connector-java-5.0.4-bin.jar. but still i cannot bind any control in the form to the aliased column. this is really frustrating. can anyone from Sun Developer explain?
    THX

Maybe you are looking for

  • Ideas for locating a Apple cinema display next to an iMac

    I have recently purchased 20-inch Cinema display to the left of my 20-inch iMac. Since there is about a 3-inch difference in display height, the Cinema display is currently sitting atop enough paper so that they are parallel to each other. My questio

  • Hard drive prevents waking from sleep

    I have a mac mini 2011 2.5Ghz core i5 that has developed an unusual problem. I just got a new Lacie D2 quadra external hard drive and if I leave it connected as the backup I cannot get the computer to wake up. When I move the mouse or tap the keyboar

  • Iphone screen went black

    Randomly today, my iPhone 4 screen went black. I can receive calls and I see volume levels. Screen black.

  • How does Disco handle multiple hierarchies in dimension from OWB?

    Hi, I have a ROLAP cube developed with OWB. All the dimensions have only one hierarchy at the moment. I derive the EUL from this cube. One of the dimensions now need another hierarchy. Does anyone know how Discoverer handles multiple hierarchies in a

  • Text in app iOS 7? It can be done.

    I did it. I don't use text cast members. I use text as variabile in Flash SWF cast members. It works. In. Your. Face. Adobe.