Codepage conversion from multi-lingual table using JDBC

Hello,
I have an Oracle database that has been around since before any unicode was available. It is currently 9.2.0.7.0 and the charset is WE8ISO8859P1. I am trying to port all of the data in the 'Translation' table to a UTF-8 database. The problem is that each of the translated strings is stored in its own native MS Windows codepage. This table was populated over the years via OCI connections in C/C++, and this method worked. But now we need it moved to UTF-8 and are using JAVA. Obviously, all the cp1252 languages come over just fine, but all the other languages get converted to garbage by JDBC, since it is auto-converting them and assumes the source is 8859. I could do it with OCI, as I mentioned, but I am mandated to use JAVA and a web interface, so users can choose what data to move/convert to the new DB (on-demand) from a web page.
Is there a way to force the Oracle connection to think the database is in a different codepage so that the conversion comes out correct? OR
Is there a way to get the data from Oracle as unconverted chars, or generic binary, or something, and then have JAVA convert it to UTF-8 from the correct codepage before writing it to the new table?
Any help is appreciated.
Monte
Message was edited by:
Wookie

## Is there a way to force the Oracle connection to think the database is
## in a different codepage so that the conversion comes out correct?
No.
## Is there a way to get the data from Oracle as unconverted chars,
## or generic binary, or something, and then have JAVA convert it
## to UTF-8 from the correct codepage before writing it to the new table?
Yes. Use:
SELECT UTL_RAW.CAST_TO_RAW(col) FROM tab;
and retrieve the value with ResultSet.getBytes. Then convert the retrieved byte[] to java.lang.String using String(byte[] bytes, String charsetName) constructor. Note, charsetName is Java name. Then, you can use setString() on PreparedStatement containing the INSERT for the converted value.
-- Sergiusz

Similar Messages

  • Error Maintaining multi-lingual tables.

    Hello, for past few days i have been stack at this error, can't find the solution. So i am bringing my problem here, hoping for an answer.
    Platform: Linux Red Hat Enterprise 5
    i am on R12.1.3 version and DB: 11g 2 realise.
    I need to install a Finnish language on EBS, so i licensed Finnish language in EBS.
    As mentioned in subject my problem lies within Maintaining multi-lingual tables.
    After i run the adadmin and select Maintain multi-lingual tables, everything is right until the last jobs, where 3 workers fail! here is the error
    sqlplus -s APPS/***** @/u01/ar121/VIS/apps/apps_st/appl/ibc/12.0.0/sql/IBCNLINS.sql
    Connected.
    PL/SQL procedure successfully completed.
    MESG
    LANGUAGE=AMERICAN
    PACKAGE=IBC_CITEM_VERSIONS_PKG
    SQLERRM=ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in textindexmethods.ODCIIndexInsert
    ORA-20000: Oracle Text error:
    DRG-10607: index meta data is not ready yet for queuing DML
    DRG-50857: oracle error in drdmlv
    ORA-01426: numeric overflow
    ORA-30576: ConText Option dictionary loading error
    MESG
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 752
    select to_date('ERROR')
    ERROR at line 1:
    ORA-01858: a non-numeric character was found where a numeric was expected
    And here is the worker fail
    ATTENTION: All workers either have failed or are waiting:
    FAILED: file IBCNLINS.sql on worker 1.
    FAILED: file CSNLINS.sql on worker 2.
    FAILED: file IRCNLINS.sql on worker 3.
    the worker error is the same on all three workers, just script is changed.
    I am pretty new at EBS, and newbie at DB administration too, so don't be so hard on me. Thx
    Edited by: 905194 on Dec 30, 2011 4:17 AM
    Edited by: 905194 on Dec 30, 2011 4:20 AM
    Edited by: 905194 on Dec 30, 2011 4:23 AM

    Was this instance upgraded from 11i and 10g database ? If so, a step in the upgrade may have been missed. Pl see this MOS Doc
    Applying The Patch 6678700 Worker 1 Failed: File Cskbcat.Ldt. ERRORS: ORA-20000: Oracle Text error: DRG-50857: oracle error in textindexmethods.ODCIIndexUpdate, DRG-13201: KOREAN_LEXER is desupported (Doc ID 1333659.1)
    If you are using 11.2.0.3, MOS Doc 1386945.1 (Oracle Text release 11.2.0.3.0 mandataroy Patches) may be applicable
    HTH
    Srini

  • Failure during running Maintain Multi-lingual Tables

    Hi,
    Currently, the system is running with R12.1.1 on RHEL 5.7.
    All the prerequisite patches are installed including language performance.
    Then, I am adding 4 additional languages. So, what's done is...
    1. Activated languages in the license manager.
    2. Run Maintain Multi-lingual Tables in AD Admin.
    I assigned 16 workers for this, and the last two assignments failed with the following messages.
    FAILED: file JTFNLINS.sql on worker 2 for product jtf username JTF.
    Deferred: file JTFNLINS.sql on worker 2 for product jtf username JTF. (Deferment number 1 for this job)
    Assigned: file JTFNLINS.sql on worker 2 for product jtf username JTF.
    FAILED: file FNDNLINS.sql on worker 1 for product fnd username APPLSYS.
    Deferred: file FNDNLINS.sql on worker 1 for product fnd username APPLSYS. (Deferment number 1 for this job)
    Assigned: file FNDNLINS.sql on worker 1 for product fnd username APPLSYS.
    FAILED: file JTFNLINS.sql on worker 2 for product jtf username JTF.
    FAILED: file FNDNLINS.sql on worker 1 for product fnd username APPLSYS.
    Completed: file AKNLINS.sql on worker 6 for product ak username AK.
    There are now 0 jobs remaining (current phase=Done):
    0 running, 0 ready to run and 0 waiting.
    ATTENTION: All workers either have failed or are waiting:
    FAILED: file FNDNLINS.sql on worker 1.
    FAILED: file JTFNLINS.sql on worker 2.
    So, when I looked at the worker specific logs, followings are the error message.
    LANGUAGE=AMERICAN
    PACKAGE=JTF_GRID_COLS_PKG
    SQLERRM=ORA-01653: unable to extend table JTF.JTF_GRID_COLS_TL by 16 in tablespa
    ce APPS_TS_SEED
    select to_date('ERROR')
    ERROR at line 1:
    ORA-01858: a non-numeric character was found where a numeric was expected
    Time when worker failed: Tue Sep 06 2011 10:11:16
    LANGUAGE=AMERICAN
    PACKAGE=FND_LOOKUP_VALUES_PKG
    SQLERRM=ORA-01653: unable to extend table APPLSYS.FND_LOOKUP_VALUES by 16 in tab
    lespace APPS_TS_SEED
    select to_date('ERROR')
    ERROR at line 1:
    ORA-01858: a non-numeric character was found where a numeric was expected
    Time when worker failed: Tue Sep 06 2011 10:11:36
    1.
    When I had search work, it seems that <not enough space> is causing this.
    Or, is there any other reason than this for the failure?
    2.
    If <not enough space> is causing the failure, how could this be handled/solved?
    3.
    After the solution is applied, how is <Maintain Multilingual Tables> resumed?
    Currently, my status is that I am on pause at the following message;
    ATTENTION: All workers either have failed or are waiting:
    FAILED: file FNDNLINS.sql on worker 1.
    FAILED: file JTFNLINS.sql on worker 2.
    ATTENTION: Please fix the above failed worker(s) so the manager can continue.
    Can anyone help me out of this problem...?
    Thanks in advance,
    - SH

    Hi,
    When I had search work, it seems that <not enough space> is causing this.
    Or, is there any other reason than this for the failure?I believe this is only the reason and you need to add some space to APPS_TS_SEED tablesapce.
    ALTER TABLESPACE APPS_TS_SEED add datafile '/<replace with the actual file name path>' size 1024M;
    3.
    After the solution is applied, how is <Maintain Multilingual Tables> resumed?
    Currently, my status is that I am on pause at the following message;If you have not stopped the adadmin, then use adctrl to restart the failed workers.
    If you have already stopped/quit adadmin, then run adadmin again.
    thanks

  • Maintain multi lingual tables poor performance

    hello all,
    i am trying to install 4 new langauges into one of my test environments.
    the first stage is to add the language via licence manager - i have done this ok.
    the enxt stage is to run 'maintain multi lingual tables' via adadmin
    the problme i am having is that one process is taking over 48 hours to fail with snapshot too old, even though i have increased the undo_retention from 10800 to 48000, the job JTFNLINS.sql still fails
    I have a tar raised at the moment, but with not much information coming back,
    has any one got any tips/hints on how i can get this job working succesfully and in a shorter time?
    many thanks
    rob

    Maybe you have already seen this note 199716.1
    Sam
    http://www.appsdbablog.com

  • To run a report from command line, when using jdbc-odbc bridge

    Hi,
    How to run a report from command line, when using jdbc-odbc bridge?
    Usually with tns, we do by "rwrun module=<> userid=<user>/<passwd>@tns".
    with odbc, we do by "rwrun module=<> userid=<user>/<passwd>@odbc:DSN"
    Please specify, what is command line arguments for jdbc-odbc bridge driver?
    Environment : Oracle 9i Report Builder on WinNT
    Database : Sybase
    Regards,
    Ramanan

    Hello Ramanan,
    Report Builder : connect JDBC Query in Report Builder is to through Connection Dialog in JDBC Query Editor. User can use a Sign on parameter (can use, default : P_JDBCPDS or can create new) to connect to JDBC Data Source. Connection once made will be mentioned and will be reused through out Reports Builder.
    JDBC PDS allows user to connect one or more same or different kind of databases.
    While running report through runtime or Server, user can pass the sign on parameter(connection string) value, like any other user parameter.
    Syntax for connection string : <username>/<password>@databaseURL . The syntax of database part of connection string depend on the type of JDBC Driver used to connect to Data Source while designing the JDBC Query. databaseURL refer to the location of the database and its format depend on the JDBCPDS river selected in design time while creating the JDBC Query.
    rwrun eg :
    rwrun report=jdbc_odbc.rdf destype=file desname=output.html desformat=html P_JDBCPDS=scott/tiger@database
    Server eg :
    http://server.com:8888/servlet/RWServlet?server=MyReportServer+report=jdbc_odbc.rdf+destype=cache+desformat=html+P_JDBCPDS=scott/tiger@database
    http :
    Please see ORACLE_HOME/reports/conf/jdbcpds.conf for more information.
    With Regards
    Reports Team

  • Error while retrieving data from PL/SQL Table using SELECT st. (Urgent!!!)

    Hi Friends,
    I am using Oracle 8.1.6 Server, & facing problems while retrieving data from a PL/SQL Table:
    CREATE or REPLACE PROCEDURE test_proc IS
    TYPE tP2 is TABLE of varchar2(10); --declared a collection
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST(dt2 as tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    While executing the above procedure, I encountered foll. error:
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [],
    ORA-06544: PL/SQL: internal error, arguments: [pfrrun.c:pfrbnd1()], [], [], [], [], [], [], []
    ORA-06553: PLS-801: internal error [0]
    Can anyone please help me, where the problem is??
    Is it Possible to retrieve data from PL/SQL TABLE using SELECT statement? & How ?
    Thanks in advance.
    Best Regards,
    Jay Raval.

    Thanks Roger for the Update.
    It means that have to first CREATE TYPE .. TABLE in database then only I can fire a Select statement on that TYPE.
    Actually I wanted to fire a Select statement on the TABLE TYPE, defined & declared in PLSQL stored procedure using DECLARE TYPE .. TABLE & not using CREATE TYPE .. TABLE.
    I was eager to know this, because my organization is reluctant in using CREATE TYPE .. TABLE defined in the database, so I was looking out for another alternative to access PL/SQL TABLE using Select statement without defining it database. It would have been good if I could access a PLSQL TABLE using Select statement Declared locally in the stored procedure.
    Can I summarize that to access a PL/SQL TABLE using SELECT statement, I have to first CREATE TYPE .. TABLE?
    If someone have any other idea on this, please do let me know.
    Thanks a lot for all help.
    Best Regards,
    Jay Raval.
    You have to define a database type...
    create type tP2 is table of varchar2(10)
    CREATE OR REPLACE PROCEDURE TEST_PROC
    IS
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST (dt2 AS tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    This will work.
    Roger

  • Creation of tables using JDBC or SQLJ in webdynpro application

    Hi,
    I am trying to create tables in javadictionary(MaxDB)using my WebDynpro application.I tried creating tables using SQLJ and JDBC.But I was not able to do it.I can select and insert data into already created tables.
    Whwn I tried creating a table using JDBC I encountered the following exception.
    com.sap.sql.log.OpenSQLException: The SQL statement "CREATE TABLE TMP_DEPID (DEPID varchar(10) NOT NULL,DEPNAME VARCHAR(25))" contains the syntax error[s]: Open SQL syntax error: CREATE ... TABLE is not supported
    SQL syntax error: "VARCHAR" is a reserved keyword and cannot be used as an unquoted identifier
    Does this mean that creating tables is not supported?
    Can anyone help me in this matter?
    Thanks in advance,
    regards
    ~Pradeep Shetty

    Hi Pradeep,
    Yes, OpenSQL does not support creation of tables. But why would you need to create tables at runtime?! The natural way is to create the model at design time of your application, i.e. with the Java DataDictionary.
    However, if for any reason you really need to create database tables at runtime, you can achieve this by using a non-OpenSQL datasource, e.g. you could create a VendorSQL one and use it to obtain JDBC connections in your app. See also http://help.sap.com/saphelp_nw04/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm.
    Hope that helps!
    Vladimir

  • Maintain Multi-Lingual Tables Option Fails On Cznlins.Sql

    Hi all.
    I am trying to install Albanian language in a 11.5.10.2 fresh installation.
    I applyed all the neccesary patches to come to the NLS apply patch stage.
    I followed the link
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=316804.1
    for applyeing NLS Patch. I have to run the AD Utility Maintain Multi-Lingual Tables ,before applying NLS.
    But the workers fail on Cznlins.Sql.
    The worker's log shows:
    Start time for file is: Wed Jun 18 2008 14:13:08
    sqlplus -s APPS/***** @/oracle/prodappl/cz/11.5.0/sql/CZNLINS.sql
    PL/SQL procedure successfully completed.
    MESG
    LANGUAGE = AMERICAN
    PACKAGE= CZ_LOCALIZED_TEXTS_PKG
    SQLERRM= ORA-01400: cannot insert NULL into ("CZ"."CZ_LOCALIZED_TEXTS"."CREATED_
    BY")
    select to_date('ERROR')
    ERROR at line 1:
    ORA-01858: a non-numeric character was found where a numeric was expected
    Time when worker failed: Wed Jun 18 2008 14:13:08
    My question are:
    1.) Has anyone encountered this problem before.On the specific Cznlins.Sql file?
    2.) Shall i skip Maintain Multi-Lingual Tables, install the NLS, and run Maintain Multi-Lingual Tables after the installation?Do you recommend me to do this?
    Thanks in advance, Soni

    Hi hsawwan
    i am sending you the Road Map of patches i have applied,in my OEL 4 server enviroment.
    1.     Apply patch 4320012
    2.     Apply patch 6502082
    3.     Apply patch 6323691
    4.     Apply patch 6831988
    5.     Apply patch 4948577
    6.     Apply patch 5713544
    7.     Apply patch 4261542
    8.     Apply patch 5216496
    9.     Apply patch 5753922
    10.     Apply patch 6195759
    11.     Apply patch 5938515
    12.     Apply patch 3830807
    13.     Apply patch 4586086
    14.     Apply patch 4888294
    15.     Apply patch 5989593
    16.     Apply patch 3218526
    17.     Apply patch 3761838
    18.     Apply patch 4206794
    19.     Apply patch 5903765
    20.     Apply patch 3865683
    21.     Apply patch 4619025
    22.     Apply patch 6372396
    23.     Apply patch 4653225
    24.     Installation of Oracle 10g R2 database,software only(different home).
    25.     Installation of Oracle 10g R2 companion cd products.
    26.     Installation of Oracle 10g R2 pachset2
    27.     Apply patch 5257698
    28.     Upgrading to Oracle 10g R2
    29.     Configuring AutoConfig on db tier
    30.     Apply patch 5753621
    31.     Prepare for NLS(failed on AD Maintain Multi-Lingual Tables on CZNLINS.sql file)
    Is this the right way, before applying NLS, for albanian language?
    Do you think i have any conflicts in my list of patches?
    Thanks, Soni

  • Export the data with Alias from the alternative table using ODI

    Hi!
    How to export the data from Essbase with Alias from the alternative table using ODI?
    Thanks.

    Are you on 10.1.3.6.x? Then: http://john-goodwin.blogspot.com/2008/09/odi-series-part-2-agent.html
    Are you on 11g? Then: http://john-goodwin.blogspot.com/2010/12/managing-odi-11g-standalone-agents.html
    I will say with only a mild amount of shame and a large amount of gratitude that I installed both releases' agents through John's blog posts.
    Regards,
    Cameron Lackpour
    Edited by: CL on Jun 4, 2012 5:48 PM
    Whoops, had the same link in there twice.

  • Selecting data from a RDBMS table using connector framework, JDBC-Connector

    Hi Experts,
    I'm trying to select data from a mysql database that is connected via the BI-JDBC System in the portal (EP 7 SP 11).
    The connection (using the Connector Gateway Service) is set up, but selecting data fails.
    Can you please give me a code example how to select data from a table using INativeQuery or IOperation / IExcecution ?? IQuery is depracted...
    Here my piece of code, actually method "connection.newNativeQuery()" throws exception "BICapabilityNotSupportedException: Operation is not supported":
         IConnection connection = null;
         public void connectToJDBCSystem(String jdbcSystem) {
           // open a connection
           try { // get the Connector Gateway Service
              Object connectorservice =
              PortalRuntime.getRuntimeResources().getService(IConnectorGatewayService.KEY);
              IConnectorGatewayService cgService =
              (IConnectorGatewayService) connectorservice;
              if (cgService == null) {
                   response.write("Error in get Connector Gateway Service <br>");
              try {
                ConnectionProperties prop =
                   new ConnectionProperties(request.getLocale(), request.getUser());
                connection = cgService.getConnection(jdbcSystem, prop);     
              } catch (Exception e) {
                   response.write("Connection to JDBC system " + jdbcSystem + " failed <br>");
                   response.write((String)e.getMessage() + "<br>");
                   e.printStackTrace();
              if (connection == null) {
                   response.write("No connection to JDBC system " + jdbcSystem + "<br>");
              } else {
                   response.write("Connection to JDBC system " + jdbcSystem + " successful <br>");
           } catch (Exception e) {
                response.write("Exception occurred <br>");
                           // up to this point it works fine...
           // build query using an IExecution object obtained from the Connection object
           response.write("prepare query 'SELECT idArt, art FROM art' <br>");
           String qstr = "SELECT idArt, art FROM art";
           INativeQuery query = null;
           try {
              query = connection.newNativeQuery();             
              response.write("execute query...<br>");
              ResultSet rs = (ResultSet)query.execute(qstr);
              while (rs.next()) {
                   response.write("<th>" + rs.getString(1) + "</th>");     
           } catch(Exception e)
              response.write("connection.newNativeQuery() failed <br>");
              response.write((String)e.getMessage() + "<br>");
              e.printStackTrace();
           } finally {
                 if( connection != null )
                 try {connection.close();}
                              catch(Exception ee){}
    Many thanks in advance, Monika
    Edited by: Monika Verwohlt on Jan 26, 2010 9:49 AM

    However this doesn't affect the XML encoding in data retrieved from XMLType using PL/SQL or programs (but it does work OK for SQLPlus SELECT).When performing an explicit serialization, with getClobVal method or XMLSerialize function, the database character set is used :
    NLS_LANG = FRENCH_FRANCE.WE8MSWIN1252
    NLS_CHARACTERSET = AL32UTF8
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> create table test_nls of xmltype;
    Table créée.
    SQL> insert into test_nls values(xmltype('<?xml version="1.0" encoding="UTF-8"?><root/>'));
    1 ligne créée.
    SQL> select * from test_nls;
    SYS_NC_ROWINFO$
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <root/>
    SQL> select t.object_value.getclobval() from test_nls t;
    T.OBJECT_VALUE.GETCLOBVAL()
    <?xml version="1.0" encoding="UTF-8"?><root/>
    SQL> select xmlserialize(document object_value as clob) from test_nls;
    XMLSERIALIZE(DOCUMENTOBJECT_VALUEASCLOB)
    <?xml version="1.0" encoding="UTF-8"?><root/>

  • Inserting Multiple Rows into Database Table using JDBC Adapter - Efficiency

    I need to insert multiple rows into a database table using the JDBC adapter (receiver).
    I understand the traditional way of repeating the statement multiple times, each having its <access> element. However, I am just wondering whether this might be performance-inefficient, as it might insert records one by one.
    Is there a way to ensure that the records are inserted into the table as a block, rather than record-by-record?

    Hi Bhavesh/Kanwaljit,
    If we have multiple ACCESS tags then what happens is that the connection to the database is made only once. But the data is inserted row by row.
    Why i am saying this?
    If we add the following in JDBC Adapter..logSQLStatement = true. Then incase of multiple inserts we can see that there are multiple
    <i>Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','1000')
    Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','2000')</i>
    Doesnt this mean that rows are inserted one by one?
    Correct me if i am wrong.
    This does not mean that the transaction is not guaranted. Either all the rows will be inserted or rolled back.
    Regards,
    Sumit

  • Select records from MS Access tables using multiple conditions

    Hi,
    I am trying to build s select list of team names for a
    sporting club website. The select list should include teams if the
    currently logged in user is a coach, team manager, assistant coach,
    player or a parent of a player.
    When I have only one group of conditions in the where clause
    it works fine. But that only accounts for one of the above roles.
    As soon as I ad an OR and another set of criteria my CF7 server's
    swsoc.exe goes into an permanent loop (well, at least 10 minutes, I
    reboot after that :-)
    For example, this works fine ...
    <!--- select teams I coach, assistant coach, manage, am a
    parent of a player, or am a player --->
    <cfquery name="teams"
    Datasource="#Application.Datasource#">
    SELECT distinct teams.uid_team, team_name, uid_coach,
    uid_team_manager, uid_coordinator, team_asst
    from teams, player_agegroups, players
    where
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    players.uid_invoice_to=#session.userid#)
    Order by team_name
    </cfquery>
    But as soon as I add another condition cf7 goes into a
    loop...
    <!--- select teams I coach, assistant coach, manage, am a
    parent of a player, or am a player --->
    <cfquery name="teams"
    Datasource="#Application.Datasource#">
    SELECT distinct teams.uid_team, team_name, uid_coach,
    uid_team_manager, uid_coordinator, team_asst
    from teams, player_agegroups, players
    where
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    players.uid_invoice_to=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    players.uid_user=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    teams_uid_coach=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    teams.team_asst=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    teams.uid_team_manager=#session.userid#)
    Order by team_name
    </cfquery>
    Any combination hangs CF7, whether it be two, three or all
    conditions, and any combination of conditions..
    The teams table stores team name, coach, team manager,
    assistant coach and coordinator. Players table stores the player
    records, and the parent (uid_invoice_to), is part of the player
    record. player agegroups has the teams, with a record for each
    player in a team. The whole system is based around seasons, hence
    the #session.season# variable.
    What should happen is I get a very short list of teams. When
    I select a team from the select list I then go and grab all the
    player records from the player_agegroups table joined to the users
    table to get their names, date of birth etc...
    Can anyone see what I am doing wrong?
    thanks
    Tanya

    You might try to change your query using a SQL JOIN command,
    so you can link the appropriate tables independently from the WHERE
    selection criteria. You could use Access to create the query and
    then go to the SQL command view to get the correct synyax.

  • Updating multiple tables using JDBC Adapter

    Hi,
    I am trying to insert/update multiple tables using one message via JDBC adapter. The following is the message being posted. However, only the first statement was executed. Anything wrong?
    Thanks in advance!
    Hart
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration"><DeliveryData><DelHeader action="UPDATE_INSERT"><table>DelHeader</table><access><DelNo>0080000230</DelNo><DelType>LF</DelType><XOverwrite>X</XOverwrite><ShipTo>0000000026</ShipTo><SoldTo>0000000026</SoldTo><Priority>00</Priority><DocDate>02/17/2007</DocDate><GText>CIF Test</GText><DelDate>02/20/2007</DelDate><PickDate>02/20/2007</PickDate><ShipPoint>NO02</ShipPoint><PackCount>00000</PackCount></access><key><DelNo>0080000230</DelNo></key></DelHeader>
    <DelItem action="INSERT"><table>DelItem</table><access><DelNo>0080000230</DelNo><ItemNo>000010</ItemNo><GText>10# GRAN-GREAT VALUE</GText><Material>G04410G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BL</UOM></access><access><DelNo>0080000230</DelNo><ItemNo>000020</ItemNo><GText>25# GRAN- GREAT VALUE</GText><Material>G04025G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BG</UOM></access></DelItem></DeliveryData></ns0:DeliveryDBUpdate>

    Hi,
    You need 2 STATEMENT level tags,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration">
    <b><DeliveryData1></b>
    <DelHeader action="UPDATE_INSERT">
    <table>DelHeader</table>
    <access>
    <DelNo>0080000230</DelNo>
    <DelType>LF</DelType>
    <XOverwrite>X</XOverwrite>
    <ShipTo>0000000026</ShipTo>
    <SoldTo>0000000026</SoldTo>
    <Priority>00</Priority>
    <DocDate>02/17/2007</DocDate>
    <GText>CIF est</GText>
    <DelDate>02/20/2007</DelDate>
    <PickDate>02/20/2007</PickDate>
    <ShipPoint>NO02</ShipPoint>
    <PackCount>00000</PackCount>
    </access>
    <key>
    <DelNo>0080000230</DelNo>
    </key>
    </DelHeader>
    <b><DeliveryData1></b>
    <b><DeliveryData2></b>
    <DelItem action="INSERT">
    <table>DelItem</table>
    <access>
    <DelNo>0080000230</DelNo>
    <ItemNo>000010</ItemNo>
    <GText>10# GRAN-GREAT VALUE</GText>
    <Material>G04410G611</Material>
    <Plant>6005</Plant>
    <SLoc>6005</SLoc>
    <RefDoc>mmenon32</RefDoc>
    <RefItem>00000000</RefItem>
    <DelQty>5.000</DelQty>
    <UOM>BL</UOM>
    </access>
    <access>
    <DelNo>0080000230</DelNo>
    <ItemNo>000020</ItemNo>
    <GText>25# GRAN- GREAT VALUE</GText>
    <Material>G04025G611</Material>
    <Plant>6005</Plant>
    <SLoc>6005</SLoc>
    <RefDoc>mmenon32</RefDoc>
    <RefItem>00000000</RefItem>
    <DelQty>5.000</DelQty>
    <UOM>BG</UOM>
    </access>
    </DelItem>
    <b></DeliveryData2></b>
    </ns0:DeliveryDBUpdate>
    Try with such a strcuture and let us know if it works.
    Regards
    Bhavesh

  • How to select specific element from a XML document using JDBC?

    Hi all,
    I have a problem with selecting specific XML element in Oracle 11g release 1 from my java application. Data are stored in object-relational storage.
    My file looks like:
    <students>
    <student id="1">
    </student>
    <student id="2">
    </student>
    <student id="3">
    </student>
    </students>
    I need to select a specific <student> element. I've already tried few ways to achieve my goal but I failed.
    SELECT extract(OBJECT_VALUE,'/students/student') FROM students - works fine, but this selects all <student> elements
    SELECT extract(OBJECT_VALUE,'/students/student[1]') FROM students - which should select first <student> element works too but it causes exception when using JDBC driver returns:
    java.sql.SQLException: Only LOB or String Storage is supported in Thin XMLType
         at oracle.xdb.XMLType.processThin(XMLType.java:2817)
         at oracle.xdb.XMLType.<init>(XMLType.java:1238)
         at oracle.xdb.XMLType.createXML(XMLType.java:698)
         at oracle.xdb.XMLType.createXML(XMLType.java:676)
         at cz.zcu.hruby.data.Select.getStudent(Select.java:45)
    SELECT to_clob(extract(OBJECT_VALUE,'/students/student[1]')) FROM students - in this case I hoped that DB would convert result to CLOB but the element is quite large (definitely more than 4000 Bytes long which I find out from forum is limit). But this exception occurs:
    java.sql.SQLException: ORA-19011: Character string buffer too small
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:897)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at cz.zcu.hruby.data.Select.getStudent(Select.java:40)
    SELECT to_lob(extract(OBJECT_VALUE,'/students/student[1]')) FROM students - I hoped I can convert return value to a LOB value but that doesn't work for me either:
    java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected -, got -
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at cz.zcu.hruby.data.Select.getStudent(Select.java:40)
    This behaviour raises two questions:
    1) Why SELECT extract(OBJECT_VALUE,'/students/student') FROM students works but SELECT extract(OBJECT_VALUE,'/students/student[1]') FROM students does't ?
    2) Is there any way how I can select specific element (element XPath /students/student[@id="some value"]) and convert it to String?
    Thanks for your responses I would appreciate any suggestion
    Honza

    To be exact my <student> element is a bit complicated and looks like the one at the end of this post (sorry but it's in czech). And I need to select whole xml fragment (all opening and closing tags included) as it is shown. Maybe I used wrong solution and I should use CLOB storage. I discuss this issue here: Which solution for better perfomance?
    Thanks anyway for your response. I would be very grateful if you have any further idea
    <Student RodneCislo="8051015555">
                   <Jmeno>Petra</Jmeno>
                   <Prijmeni>Nováková</Prijmeni>
                   <RodnePrijmeni>Novotná</RodnePrijmeni>
                   <TitulPred>Bc.</TitulPred>
                   <TitulZa>MBA.</TitulZa>
                   <Adresa>
                        <Okres>3702</Okres>
                        <Obec>582786</Obec>
                        <CastObce>11908</CastObce>
                        <Ulice>Nova</Ulice>
                        <UliceCislo>4</UliceCislo>
                        <PSC>60000</PSC>
                        <Stat>203</Stat>
                   </Adresa>
                   <RodinnyStav>1</RodinnyStav>
                   <StredniSkola>000559024</StredniSkola>
                   <RokMatZkousky>2001</RokMatZkousky>
                   <PPStudent DatumVerifikace="2006-08-04">
                        <SoubeznaStudia>1</SoubeznaStudia>
                        <SoubeznaStudiaMaxDelka>2.0</SoubeznaStudiaMaxDelka>
                        <CelkovaDobaStudia>1817</CelkovaDobaStudia>
                   </PPStudent>
                   <Studia>
                        <Studium VSFakulta="14330" StudijniProgram="B1801" ZapisDoStudia="2001-07-10">
                             <DelkaStudia>5.0</DelkaStudia>
                             <NovePrijaty>N</NovePrijaty>
                             <NavazujiciStudProgram>N</NavazujiciStudProgram>
                   <PredchoziVzdelani>K</PredchoziVzdelani>
                             <PocetRocniku>5</PocetRocniku>
                             <AktualniRocnik>5</AktualniRocnik>
                             <UbytovaniVKoleji>3</UbytovaniVKoleji>
                             <UkonceniStudia Datum="2004-06-28" Zpusob="1" UdelenyTitul="Bc."/>
                             <StudiumEtapy>
                                  <StudiumEtapa PlatnostOd="2001-07-10">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <JazykVyuky>cze</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801R001</Obor>
                                            <Obor>1801R005</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo>2002-04-24</PlatnostDo>
                                  </StudiumEtapa>
                                  <StudiumEtapa PlatnostOd="2002-04-24">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <StudijniPobyt Forma="V" Program="51" Stat="056"/>
                                       <JazykVyuky>cze</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801R001</Obor>
                                            <Obor>1801R005</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo>2002-09-01</PlatnostDo>
                                  </StudiumEtapa>
                                  <StudiumEtapa PlatnostOd="2002-09-01">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <JazykVyuky>cze</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801R001</Obor>
                                            <Obor>1801R005</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo>2004-06-28</PlatnostDo>
                                  </StudiumEtapa>
                             </StudiumEtapy>
                        </Studium>
                        <Studium VSFakulta="14330" StudijniProgram="N1802" ZapisDoStudia="2004-06-29">
                             <DelkaStudia>2.0</DelkaStudia>
                             <NovePrijaty>N</NovePrijaty>
                             <NavazujiciStudProgram>A</NavazujiciStudProgram>
                             <PredchoziVzdelani>R</PredchoziVzdelani>
                             <PocetRocniku>2</PocetRocniku>
                             <AktualniRocnik>1</AktualniRocnik>
                             <UbytovaniVKoleji>3</UbytovaniVKoleji>
                             <SocialniStipendia>
                                  <SocialniStipendium NarokOd="2006-01-01">
    <NarokDo>2006-10-30</NarokDo>
                                  </SocialniStipendium>
                             </SocialniStipendia>
                             <UkonceniStudia Datum="" Zpusob="" UdelenyTitul=""/>
                             <PPStudium DatumVerifikace="2006-07-01">
                                  <NovePrijatyVerif>N</NovePrijatyVerif>
                                  <NovePrijatyKvalif>N</NovePrijatyKvalif>
                                  <NavazujiciStudProgramVerif>A</NavazujiciStudProgramVerif>
                                  <UkonceniStudiaVerif/>
                                  <FinancovanoCR>A</FinancovanoCR>
                                  <SberId>38</SberId>
                                  <DobaStudia>
                                       <Cista>733</Cista>
                                       <VcetneNeuspechuDanehoTypu>733</VcetneNeuspechuDanehoTypu>
                                       <VcetneVsechNeuspechu>733</VcetneVsechNeuspechu>
                                  </DobaStudia>
                                  <PrestoupenoKamPosledni VSFakulta="14330" StudijniProgram="N1802" ZapisDoStudia="2004-06-29"/>
                                  <UbytovaciStipendiumKod/>
                             </PPStudium>
                             <StudiumEtapy>
                                  <StudiumEtapa PlatnostOd="2004-06-29">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <JazykVyuky>eng</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801T001</Obor>
                                            <Obor>1801T025</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo/>
                                       <PPStudiumEtapa DatumVerifikace="2006-07-01">
                                            <FinancovaniVerif>1</FinancovaniVerif>
                                            <StudentRozpoctovy>O</StudentRozpoctovy>
                                            <SberId>38</SberId>
                                       </PPStudiumEtapa>
                                  </StudiumEtapa>
                             </StudiumEtapy>
                        </Studium>
                   </Studia>
              </Student>

  • Updating 3rd parties db table using JDBC adapter at sender side

    hi all.
    i just want to know how i can updated the 3rd party db table field.
    my scenario is just to retrieve data from 3rd party DB table where the condition is like " to select records where processed (field name ) = " ".
    but i just need to update this field to x immediately after retrieving data from it.
    so i simply wote the sql statement select REC_NO, ACTN_DAT, METRNO, MET-READ from PHAKAMA_CONN where processed = " ". under jdbc CC query sql stmt  at sender side .
    but i want to know how we can updated the processed (field ) from " " to "x"immeidtely after retrieving.
    so could any body advice me how we can achiev this through UPDATE SQL STMT under sender jdbc cc.i just want to know wat stmt do we need to srite under this.
    waiting for u r response.
    cheers.
    seeta ram.

    Ram,
    Execute your Select statement as needed and in the sender jdbc communication channel in the update SQL statement give this:
    UPDATE <tablename> SET <fieldname> = 'X' WHERE <fieldname>= ' '
    Also just to make sure if you have access to the database just login and execute this statement which should give the results as expected. If this works here successfully then it executes the same in XI also.
    Regards,
    ---Satish

Maybe you are looking for

  • How do i make my Video look like a dream.

    Hi, I was doing a cartoon video thing. And There should be this person Dreaming about stuff. Usually in Tv shows, Dreams are Black and While + a smooshy black frame thing. I know how to do the Ones where i make a frame that looks like a box. But it l

  • ADF BC/Faces - Order of validation / backing bean action problem

    Hello, I want the user to enter the same "operation date" into all adf faces table rows created in one batch (one transaction). So I removed operation date field from the table and added "unbound" date field above the table. The date field value is t

  • 32-bit ODAC 11.2.0.2.1 Installed on Win7 X64 with Oracle 11gR2 x64

    I have Visual Studio 2010 x64 installed on a Win7 x64 Enterprise system, along with Oracle Express Edition 11gR2 x64. I downloaded and installed 32-bit ODAC 11.2.0.2.1 so I could use Oracle databases with Visual Studio, along with SQL Server. When I

  • Problem in Backup/Recovery 10g

    Hi I am Trying to Take Backup in Oracle 10g ........ RMAN > Configure retention policy to recovery window of 4 days RMAN > configure controlfile autobackup on; RMAN > Configure device type disk backup type to compressed backupset; RMAN> backup as bac

  • Scale document during Export

    Hi All! Ever since Apple pulled the plug on print to PDF in Snow Leopard, we've been forced to export to PDF. Which is sort of fine. Except - say I want to output my document at 95%, how do I do that with Export? Rescale document in Acrobat, you say?