Regroup a lot of small sql request

hello
I'am developping a server in c
This server connects to a database
I use oo4o for the connection
But I have I problem because I have a lot of small request like that
select cdf_nom
from cdf_codif, fitty_typeinteraction
where
     fitty_fit_code_fk_pk like '183'
     and fitty_cdf_type_code_fk_pk = cdf_code_pk
     and cdf_numero_pk like 'IY'
All works ok but the application is too slow because I have a function in c by request like that
     strcpy(sqls,"select cdf_nom");
     strcat(sqls," from splab_specialite_labo, cdf_codif");
     strcat(sqls," where");
     strcat(sqls," splab_sp_code_fk_pk like '");
     strcat(sqls,idLabo);
     strcat(sqls,"' ");
     strcat(sqls," and splab_cdf_lab_code_fk_pk = cdf_code_pk");
     strcat(sqls," and cdf_numero_pk like '15'");
     /* execute la requete */
     requete.Open(*databb,sqls);
     while (!requete.IsEOF())
          /* balise statutLabo */
          requete.GetFieldValue("cdf_nom", statutLabo,TAILLE_CDF_NOM);
          if (strlen(statutLabo) != 0)
               bstrValue = AsciiToBSTR(statutLabo);
               if (!bstrValue)
                    ERROR1("Theriaque : AsciiToBSTR function failed");
                    goto shutdown ;
               cleanAllString(bstrValue);
               elementNode = requestDoc->CreateNode(NODE_ELEMENT, V_StatutLabo, rootRequestNode, bstrValue);
               if (!elementNode)
                    ERROR1("Theriaque : creation of element node failed");
                    goto shutdown ;
               SAFERELEASE(elementNode);
               if (bstrValue) SysFreeString(bstrValue);
               bstrValue = NULL ;
          requete.MoveNext();
I would like to know how to optimise it but I can't regroup all the small request in a big requestbecause it's to slow
If it's possible a pl/sql bloc it's will be great

Usually very large directories suffer from bad access times. If you have a single directory with nearly a million files, you will discover that the time for opening the file is much greater than the time for reading it.
If you have a directory tree containing the files (say that you have a directory, with 100 subdirectories, each one containing 100 subdirectories, each one containing 100 files) you can open the files much faster.

Similar Messages

  • How to print sql request result to screen by page?

    Hello,
    I'm a beginer in java developpement. I'm looking for information for :
    I want to print to screen the result of a sql request. but I don't know how many lines will be selected. so I want to cut the result in many pages.
    1)how can I do this?
    2)may I do this in Java? if yes in wich package may I search? and is this take a lot of place in memory?
    3)or may I do this with SQL?
    Thank you for your help

    Hi,
    This is a small code snippet, i believe this is more than enough...
    String url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=firstDB)))";
    String username= "test";
    String password = "test";
    String GET_EMPLOYEE_DETAILS = "select name, age from managers";
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection con = DriverManager.getConnection(url, username, password1);
    PreparedStatement pstmt =con.prepareStatement(GET_EMPLOYEE_DETAILS );
    ResultSet rs = pstmt.executeQuery();
    while ( rs.next())
    System.out.println(rs.getString("name") + ":"+ rs.getInt("age") );
    rs.close();
    pstmt.close();
    con.close

  • Performance issue on 1 SQL request

    Hi,
    We have a performance problem. We have 2 systems. PRD and QAS (QAS is a copy of PRD as of September 2nd)
    SQL request is identical.
    table structures is identical.
    indexes are identical.
    views are identical
    DB stats have all been recalculated on both systems
    initSID.ora values are almost identical. only memory related parameters (and SID) are different.
    Obviously, data is different
    For you info, view ZBW_VIEW_EKPO fetched its info from tables EIKP, LFA1, EKKO and EKPO.
    Starting on September 15th, a query that used to take 10 minutes started taking over 120 minutes.
    I compared explain plans on both system and they are really different:
    SQL request:
    SELECT
      "MANDT" , "EBELN" , "EBELP" , "SAISO" , "SAISJ" , "AEDAT" , "AUREL" , "LOEKZ" , "INCO2" ,
      "ZZTRANSPORT" , "PRODA" , "ZZPRDHA" , "ZZMEM_DATE" , "KDATE" , "ZZHERKL" , "KNUMV" , "KTOKK"
    FROM
      "ZBW_VIEW_EKPO"
    WHERE
      "MANDT" = :A0#
    Explain plan for PRD:
    SELECT STATEMENT ( Estimated Costs = 300,452 , Estimated #Rows = 0 )
            8 HASH JOIN
              ( Estim. Costs = 300,451 , Estim. #Rows = 4,592,525 )
              Estim. CPU-Costs = 9,619,870,571 Estim. IO-Costs = 299,921
              Access Predicates
                1 TABLE ACCESS FULL EIKP
                  ( Estim. Costs = 353 , Estim. #Rows = 54,830 )
                  Estim. CPU-Costs = 49,504,995 Estim. IO-Costs = 350
                  Filter Predicates
                7 HASH JOIN
                  ( Estim. Costs = 300,072 , Estim. #Rows = 4,592,525 )
                  Estim. CPU-Costs = 9,093,820,218 Estim. IO-Costs = 299,571
                  Access Predicates
                    2 TABLE ACCESS FULL LFA1
                      ( Estim. Costs = 63 , Estim. #Rows = 812 )
                      Estim. CPU-Costs = 7,478,316 Estim. IO-Costs = 63
                      Filter Predicates
                    6 HASH JOIN
                      ( Estim. Costs = 299,983 , Estim. #Rows = 4,592,525 )
                      Estim. CPU-Costs = 8,617,899,244 Estim. IO-Costs = 299,508
                      Access Predicates
                        3 TABLE ACCESS FULL EKKO
                          ( Estim. Costs = 2,209 , Estim. #Rows = 271,200 )
                          Estim. CPU-Costs = 561,938,609 Estim. IO-Costs = 2,178
                          Filter Predicates
                        5 TABLE ACCESS BY INDEX ROWID EKPO
                          ( Estim. Costs = 290,522 , Estim. #Rows = 4,592,525 )
                          Estim. CPU-Costs = 6,913,020,784 Estim. IO-Costs = 290,141
                            4 INDEX SKIP SCAN EKPO~Z02
                              ( Estim. Costs = 5,144 , Estim. #Rows = 4,592,525 )
                              Search Columns: 2
                              Estim. CPU-Costs = 789,224,817 Estim. IO-Costs = 5,101
                             Access Predicates Filter Predicates
    Explain plan for QAS:
    SELECT STATEMENT ( Estimated Costs = 263,249 , Estimated #Rows = 13,842,540 )
            7 HASH JOIN
              ( Estim. Costs = 263,249 , Estim. #Rows = 13,842,540 )
              Estim. CPU-Costs = 59,041,893,935 Estim. IO-Costs = 260,190
              Access Predicates
                1 TABLE ACCESS FULL LFA1
                  ( Estim. Costs = 63 , Estim. #Rows = 812 )
                  Estim. CPU-Costs = 7,478,316 Estim. IO-Costs = 63
                  Filter Predicates
                6 HASH JOIN
                  ( Estim. Costs = 263,113 , Estim. #Rows = 13,842,540 )
                  Estim. CPU-Costs = 57,640,387,953 Estim. IO-Costs = 260,127
                  Access Predicates
                    4 HASH JOIN
                      ( Estim. Costs = 2,127 , Estim. #Rows = 194,660 )
                      Estim. CPU-Costs = 513,706,489 Estim. IO-Costs = 2,100
                      Access Predicates
                        2 TABLE ACCESS FULL EIKP
                          ( Estim. Costs = 351 , Estim. #Rows = 54,830 )
                          Estim. CPU-Costs = 49,504,995 Estim. IO-Costs = 348
                          Filter Predicates
                        3 TABLE ACCESS FULL EKKO
                          ( Estim. Costs = 1,534 , Estim. #Rows = 194,660 )
                          Estim. CPU-Costs = 401,526,622 Estim. IO-Costs = 1,513
                          Filter Predicates
                    5 TABLE ACCESS FULL EKPO
                      ( Estim. Costs = 255,339 , Estim. #Rows = 3,631,800 )
                      Estim. CPU-Costs = 55,204,047,516 Estim. IO-Costs = 252,479
                      Filter Predicates
    One more bit of information, PRD was copied to TST about a month ago and this one is also slow.
    I did almost anything I could think of.

    > DB stats have all been recalculated on both systems
    > initSID.ora values are almost identical. only memory related parameters (and SID) are different.
    > Obviously, data is different
    Ok, so you say: the parameters are different, the data is different and the statistics are different.
    I'm surprised that you still expect the plans to be the same...
    > For you info, view ZBW_VIEW_EKPO fetched its info from tables EIKP, LFA1, EKKO and EKPO.
    We will need to see the view definition !
    > Starting on September 15th, a query that used to take 10 minutes started taking over 120 minutes.
    Oh - Sep. 15th - that explains it ... just kiddin'.
    Ok, so it appears to be obvious that from that day on, the execution plan for the query was changed.
    If you're on Oracle 10g you may look it up again and also recall the CBO stats that had been used back then.
    > I compared explain plans on both system and they are really different:
    >
    > SQL request:
    >
    SELECT
    >   "MANDT" , "EBELN" , "EBELP" , "SAISO" , "SAISJ" , "AEDAT" , "AUREL" , "LOEKZ" , "INCO2" ,
    >   "ZZTRANSPORT" , "PRODA" , "ZZPRDHA" , "ZZMEM_DATE" , "KDATE" , "ZZHERKL" , "KNUMV" , "KTOKK"
    > FROM
    >   "ZBW_VIEW_EKPO"
    > WHERE
    >   "MANDT" = :A0#
    Ok - basically you fetch all rows from this view as MANDT is usually not a selection criteria at all.
    > Explain plan for PRD:

    SELECT STATEMENT ( Estimated Costs = 300,452 , Estimated #Rows = 0 )
    >
    >         8 HASH JOIN
    >           ( Estim. Costs = 300,451 , Estim. #Rows = 4,592,525 )
    >           Estim. CPU-Costs = 9,619,870,571 Estim. IO-Costs = 299,921
    >           Access Predicates
    >
    >             1 TABLE ACCESS FULL EIKP
    >               ( Estim. Costs = 353 , Estim. #Rows = 54,830 )
    >               Estim. CPU-Costs = 49,504,995 Estim. IO-Costs = 350
    >               Filter Predicates
    >             7 HASH JOIN
    >               ( Estim. Costs = 300,072 , Estim. #Rows = 4,592,525 )
    >               Estim. CPU-Costs = 9,093,820,218 Estim. IO-Costs = 299,571
    >               Access Predicates
    >
    >                 2 TABLE ACCESS FULL LFA1
    >                   ( Estim. Costs = 63 , Estim. #Rows = 812 )
    >                   Estim. CPU-Costs = 7,478,316 Estim. IO-Costs = 63
    >                   Filter Predicates
    >                 6 HASH JOIN
    >                   ( Estim. Costs = 299,983 , Estim. #Rows = 4,592,525 )
    >                   Estim. CPU-Costs = 8,617,899,244 Estim. IO-Costs = 299,508
    >                   Access Predicates
    >
    >                     3 TABLE ACCESS FULL EKKO
    >                       ( Estim. Costs = 2,209 , Estim. #Rows = 271,200 )
    >                       Estim. CPU-Costs = 561,938,609 Estim. IO-Costs = 2,178
    >                       Filter Predicates
    >                     5 TABLE ACCESS BY INDEX ROWID EKPO
    >                       ( Estim. Costs = 290,522 , Estim. #Rows = 4,592,525 )
    >                       Estim. CPU-Costs = 6,913,020,784 Estim. IO-Costs = 290,141
    >
    >                         4 INDEX SKIP SCAN EKPO~Z02
    >                           ( Estim. Costs = 5,144 , Estim. #Rows = 4,592,525 )
    >                           Search Columns: 2
    >                           Estim. CPU-Costs = 789,224,817 Estim. IO-Costs = 5,101
    >                          Access Predicates Filter Predicates
    Ok, we've no restriction to the data, so Oracle chooses the access methods it thinks are best for large volumes of data - Full table scans and HASH JOINS. The index skip scan is quite odd - maybe this is due to one of the join conditions.
    > Explain plan for QAS:

    SELECT STATEMENT ( Estimated Costs = 263,249 , Estimated #Rows = 13,842,540 )
    >
    >         7 HASH JOIN
    >           ( Estim. Costs = 263,249 , Estim. #Rows = 13,842,540 )
    >           Estim. CPU-Costs = 59,041,893,935 Estim. IO-Costs = 260,190
    >           Access Predicates
    >
    >             1 TABLE ACCESS FULL LFA1
    >               ( Estim. Costs = 63 , Estim. #Rows = 812 )
    >               Estim. CPU-Costs = 7,478,316 Estim. IO-Costs = 63
    >               Filter Predicates
    >             6 HASH JOIN
    >               ( Estim. Costs = 263,113 , Estim. #Rows = 13,842,540 )
    >               Estim. CPU-Costs = 57,640,387,953 Estim. IO-Costs = 260,127
    >               Access Predicates
    >
    >                 4 HASH JOIN
    >                   ( Estim. Costs = 2,127 , Estim. #Rows = 194,660 )
    >                   Estim. CPU-Costs = 513,706,489 Estim. IO-Costs = 2,100
    >                   Access Predicates
    >
    >                     2 TABLE ACCESS FULL EIKP
    >                       ( Estim. Costs = 351 , Estim. #Rows = 54,830 )
    >                       Estim. CPU-Costs = 49,504,995 Estim. IO-Costs = 348
    >                       Filter Predicates
    >                     3 TABLE ACCESS FULL EKKO
    >                       ( Estim. Costs = 1,534 , Estim. #Rows = 194,660 )
    >                       Estim. CPU-Costs = 401,526,622 Estim. IO-Costs = 1,513
    >                       Filter Predicates
    >
    >                 5 TABLE ACCESS FULL EKPO
    >                   ( Estim. Costs = 255,339 , Estim. #Rows = 3,631,800 )
    >                   Estim. CPU-Costs = 55,204,047,516 Estim. IO-Costs = 252,479
    >                   Filter Predicates
    Ok, we see significantly different table sizes here, but at least this second plan leaves out the superfluous Index Skip Scan.
    How to move on from here?
    1. Check whether you've installed all the current patches. Not all bugs that are in the system are hit all the time, so it may very well be that after new CBO stats were calculated you just begin to hit one of it.
    2. Make sure that all parameter recommendations are implemented on the systems. This is crucial for the CBO.
    3. Provide a description of the Indexes and the view definition.
    The easiest would be: perform an Oracle CBO trace and provide a download link to it.
    regards,
    Lars

  • Unable to view SQL Request in Log files

    Hi Folks,
    I am facing an issue which I am unable to find out the solution to view the physical query generated in log files in Presentation Services.
    Below is the SQL Request generated but I want to view the exact physical query i.e SQL Request which is hitting DB.
    So please guiude me to resolve this issue, I guess it is because of Initialization blocks created which is blocking to view the SQL request.
    -------------------- SQL Request:
    set variable LOGLEVEL = 7;SELECT "- Policy Effective-Start Date"."Start Quarter" saw_0, "- Insurance Policy Facts".Revenue saw_1, "- Insurance Policy Facts"."# Insurance Policies" saw_2, "Insurance Policy".Status saw_3, "Insurance Policy".Type saw_4 FROM "Insurance Policies" WHERE ("Insurance Policy".Type = 'Policy') AND ("- Policy Effective-Start Date"."Start Julian Day Number" BETWEEN VALUEOF(CURRENT_JULIAN_DAY)-365 AND VALUEOF("CURRENT_JULIAN_DAY")) ORDER BY saw_0, saw_3, saw_4
    /* QUERY_SRC_CD='rawSQL' */
    Regards
    Dj

    There is no Enterprise Edition of SSMS. There is SSMS Basic and SSMS Complete. Prior to 2012 sp1, only SSMS Basic were available with Express Edition - but as of 2012 sp1 Expredd also offers SSMS Complete. SSMS Complete is selected bu default when you install
    SSMS (unless you are prior to 2012 sp1 and are using Express, of course).
    However, even SSMS Basic *should* show Agent assuming you have permissions for that. This is hearsay, but from trusted sources. Here is what to do:
    Check what is installed for the machine from where you are running SSMS. You can do that using SQL Server Installation Center - see this blog post: http://sqlblog.com/blogs/tibor_karaszi/archive/2011/02/10/what-does-this-express-edition-look-like-anyhow.aspx
     (towards the end).
    On that machine try both this problematic account as well as an account which is sysadmin. Does the sysadmin account see Agent? If so, you know permissions aren't granted properly. If not, then you know the tool is the problme.
    Also try the problematic account from a machine where you know you see Agent normally. Again, this will help you assess whether the problem is the tool (SSMS) or permissions for the account.
    Tibor Karaszi, SQL Server MVP |
    web | blog

  • My iTunes home screen displays a lot of small boxes with the letter A in it instead of text

    my iTunes home screen displays a lot of small boxes with the letter A in it instead of text

    Periodically double click the home button and close all the apps in the recently used dock. Then power off and then back on the iPod. This frees up memory. The 4G only has 256 MB of memory.
    Also, sometimes restoring the iPod helps.

  • Invalid month sql request for chart

    Hi,
    i try to refresh a report with a dynamical sql request as following :
    select NULL LINK, status_label LABEL, count(fcr.status_code) as VALUE
    from table
    where table.date > '05/06/2007'
    This query is generated dynamicaly from a date picker.
    My problem is that the chart witch should be refreshed by this query, isn't.
    The following error message come from the ajax query :
    chart Flash Chart error: ORA-20987: APEX - Flash Chart error:  - ORA-20001: Fetch error: ORA-01843: not a valid month
    Something disapoint me: when i execute the query in plSQL i have got my wished results.
    Does someone have any idea about this mistake?

    Hi better,
    Try to give
    where table.date >to_date( '05/06/2007','dd/mm/yyyy');Brgds,
    Mini
    Mark Answers Promptly

  • One Small Feature Request

    Well, I got the Add-In installed and working. Looks pretty good. One small feature request I have, that I have become accustom to doing from another tool that I use is that when editing a package, in the Oracle Explorer window, when you expand the Packages node, then expand the package you are working on, it shows a list of procedures and functions in that package. This is great. Now what would be really great is that if you could double click on one of these procedures or functions it would take you to that place in the code of the package body.
    So for example, let's say I have a package called Pkg_DoStuff. Pkg_DoStuff has three procedures, Foo1, Foo2, and Foo3. When I expand Pkg_DoStuff in the Oracle Explorer windows, I see nodes for Foo1, Foo2, and Foo3. Now, if I double click on Foo3, I would like the code window to place the cursor at the start of the Foo3 procedure in the package body.
    Thanks,
    Kevin

    Another feature request:
    Please add a Raptor feature to the Data Connections and allow users to apply filters to tree browsing. We use Oracle Apps 11i, and there must be about 50 thousand tables, views and packages that can potentially be visible. It usually takes several minutes for the Data Connections tree to respond when I bring up a list of tables even for a login with limited access. However, with the filter applied in raptor, I can browse very quickly to tables, views and packages that I need.
    Thank you.

  • AD HOC SQL request

    Hi,
    Sorry if this one is a bit silly but how can I create a SQL request such as 'SELECT FIELDA,FIELDB,FIELDC FROM TABLE WHERE FIELDC = 'BLA'' and use the result as an input for an interface?
    JF

    Use ODI for that :)
    Create or reverse the datastore "TABLE" with column FIELDA etc..
    create an interface
    drag and drop your datastore "TABLE' and create the mapping do not forget the filter FIELDC="BLA"

  • ST04-SQL Request

    Hi Friends,
    In my production system, I've executed the ST04 transaction, Detailed Analysis Menu....SQL Request....Sorted by Buffer gets... and I checked the SQL statement....and then clicked on display execution plan for SQL statement...
    There it shows the following information
    SELECT STATEMENT ( Estimated Costs = 17,039 , Estimated #Rows = 0 )
            1 TABLE ACCESS FULL LIPS
              ( Estim. Costs = 17,038 , Estim. #Rows = 1 )
              Estim. CPU-Costs = 885,646,245 Estim. IO-Costs = 16,963
              Filter Predicates
    What are the parameters that will indicate that there is an issue with the SQL statement
    Regards
    Aliila

    Hello Aliila,
    As indicated below, the statement is expensive as the explain plan goes for full table scan. As LIPS table is one of the line item table, it has to read all the blocks of this table to satisfy the user query. So if there is no WHERE clause in the corresponding ABAP code, then you have to discuss with your ABAP developer to input the selective fields in the WHERE clasue so that appropriate indexes will be choosen in the explain plan. From this i can easily conclude that this statment is expensive because of either of these reasons.
    1. Missing Where clause in the ABAP code ( I believe this is coming from Z* program/transaction) or
    2. User is not inputting any criteria for selecting this ( Here you to need to train the user).
    Back to your question: if you are doing sql cache analysis through ST04 normally you have to find out the statement based on the following criteria.
    1. Greater than 5% of  the total buffer gets ( This will cause memory load)
    and/or
    2. Greater than 2% of the physcial reads ( This cause I/O Load).
    you can find that total buffers gets and physical read from ST04 initial screen.
    Hope above information will help you.
    Yours Sincerely
    Dileep

  • Small SQL problem

    Hello,
    I have a small SQL problem...
    I am designing an online bank using servlets for a university project and it allows customers to view their statements. They select which of their account numbers they want to view the statement for and the start and end date of the statement.
    The problem lies with the dates. Here is the SQL:
    SELECT date, details, amount, balance
    FROM HISTORY
    WHERE bankaccnumber=13494925 And date>=1/1/01 And date<=31/1/01;
    All of the books I have looked at show dates in '1/1/01' format but whenever I try it this way I get a 'Data type mismatch in criteria expression' error (the 'date' field in the Database IS a Date type).
    Although, whenever I run the query in Access and prompt the user to enter the start and end date, it works fine.
    I have spoken to a few people and no-one seems to know why it is not working.
    Any ideas???
    Thanks

    If your database is MS Access and you don't expect to switch to something else, then write this:
    SELECT date, details, amount, balance
    FROM HISTORY
    WHERE bankaccnumber=13494925 And [date]>=#1/1/01# And [date]<=#1/31/01#
    Note that you MUST format your dates as MM/DD/YY and not as DD/MM/YY, that's an Access rule, and that you will probably have to "quote" your column name "date", which I think is a reserved word in SQL and hence a bad choice for column name.
    Personally I always use PreparedStatements. That way my SQL would look like this:
    SELECT date, details, amount, balance
    FROM HISTORY
    WHERE bankaccnumber=13494925 And date>=? And date<=?
    and I would use the setDate() method to fill in the parameters. Since this method uses a Date as a parameter, I don't need to fight with date formats, the JDBC driver handles that for me.

  • Help asked for a sql request - thanks

    Hello,
    I'm not a sql Guru... Who can help for this sql request ?
    First I have this:
    SELECT ADDINFO_ID, INFO, LANGUAGE_FK, ENGLISH_NAME
    FROM V_ADDINFOS
    WHERE LANGUAGE_FK = 'EN' (which is very simple...-)
    But now complicated... I have to add this in the same request:
    select sum(val) as nbrInfo
    from(
    select count(*) val from eccgis where addinfo1_fk = ADDINFO_ID
    union all
    select count(*) val from eccgis where addinfo2_fk = ADDINFO_ID
    union all
    select count(*) val from eccgis where addinfo3_fk = ADDINFO_ID
    union all
    select count(*) val from thirdgis where addinfo1_fk = ADDINFO_ID
    union all
    select count(*) val from thirdgis where addinfo2_fk = ADDINFO_ID
    In other words, for each row of the first select, I need to know how much it is linked in the tables eccgis and thirdgis...
    Hope is is clear... -)
    Thank you very very much,
    Michel

    Hi, Michel,
    Almost anywhere that SQL allows an expression (such as a column name, literal or function call) it also allows a scalar sub-query, a SELECT statement based on any table (or tables) that returns one column and (at most) one row. Like other sub-queries, scalar sub-queries can be corellated to the main query.
    To get the grand total you want on each row of your output:
    SELECT ADDINFO_ID, INFO, LANGUAGE_FK, ENGLISH_NAME
    , (select count(*) from eccgis where addinfo1_fk = ADDINFO_ID)
    + (select count(*) from eccgis where addinfo2_fk = ADDINFO_ID)
    + (select count(*) from eccgis where addinfo3_fk = ADDINFO_ID)
    + (select count(*) from thirdgis where addinfo1_fk = ADDINFO_ID)
    + (select count(*) from thirdgis where addinfo2_fk = ADDINFO_ID)
    AS nrbInfo
    FROM V_ADDINFOS
    WHERE LANGUAGE_FK = 'EN';VERY IMPORTANT: Each sub-query must be in parentheses. You'll get a run-time error if any scalar sub-query returns more than one row. (Returning no rows is okay: the value will be NULL).
    By the way, this looks like a bad table design. If each row in eccgis or thirdgis can be associated with more than one foreign key, they should be kept in a separate table. That's the standard way to handle many-to-many relationships.

  • SQL requests when handling a refresh on a persistent-dirty instance

    I just noticed that Kodo issues two SQL requests when handling a refresh
    on a persistent-dirty instance, the first one getting the JDOLOCKX
    column value.
    For a persistent-clean instance, it makes sense to get the version
    number first and to check if it has been changed. If not, the attribute
    values are not read from the database.
    For a persistent-dirty instance, as the memory state has been changed,
    it has to be reloaded anyway and it seems to me that the first request
    is useless.
    Any confirmation ?
    Thanks.

    Yeah, the version check seems to be extraneous. We'll see what we can do
    about that. Thanks for pointing it out!

  • Trace PL/SQL request

    Hi,
    I have a PL/SQL concurrent request which is called by the concurrent request each hour..
    I need something which is similar to the trace when we are using DBMS_OUTPUT.PUT_LINE.
    Is there a simple way that allow me to trace the commands executed by this pl/sql ??
    Thanks a lot.

    Hi,
    You can enable trace on any concurrent request by referring to (Note: 296559.1 - FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12) and (Note: 453527.1 - How To Trace a Concurrent Request And Generate TKPROF File).
    Regards,
    Hussein

  • Should I buy a new MBP?  (Lots of small issues with mine)

    Hi,
    There are a number of small but irritating problems with my MBP. Talking with a friend who has had her macbook into apple service 3 times now for replacements a lot more serious than my problems, I'm sure Apple won't replace the computer. A friend who has bought a couple MBPs now (later week version) has had very little problem with his.
    Specifically, the issues I'm having are as follows:
    1) CPU whine (I know this can't be fixed)
    2) Fan "moo"/clunk. The computer sounds like a small helicopter at times and at the best of times is always noisy..
    3) Heat issues - using the comp anywhere but on a flat surface (i.e. on my lap) and it heats up intensely. I know this is an issue with all computers, but compared to my powerbook it's night and day.
    4) Lag Issues. Doing ANYTHING takes a "long" time. I need to reformat but from opening firefox to booting up the computer or even sometimes mousing over the icon tray.
    5) Red headphone led. My internal speakers no longer work. I've read the problem has something to do with the headphone jack being stuck. Some fixes I've read include using a match stick, plugging in the headphones again (doesn't work).
    6) My display flickers slightly now also. Seems to synch with the fan "moo"ing.
    I'm using macintosh now because I like avoiding hassles. I switched from PC a few years ago after going through lots of issues and the powerbook was AWESOME. I'm assuming the macbookpro is going to eventually stabilize and work well also, is it there yet? Shall I buy a new one and just dump the current or will it be the same thing all over?
    Macbook Pro / 12" Powerbook Mac OS X (10.4.6)

    Thanks for all the advice, it's appreciated. Particularly the advice to go down to the mac store and talk to a guru. I'm going to do that tomorrow.
    I've been able to tolerate things up until the latest bug, the fan now periodically starts spinning like a helicopter. It's way beyond anything I've dealt with.. I can't listen to music it's so loud and it disturbs anyone else around (clearly needs a fix).
    I can't send it in to be repaired as I can't do without a computer for that long. This said I thought to connect the new and old machine and copy the most important files over.
    (No I won't dump this lemon on someone else without letting them know about the issues. It may well be worthwhile to someone willing to nurse it through the various mac warranty & update issues. Eventually they may well end up with a new MBP).
    Macbook Pro / 12" Powerbook Mac OS X (10.4.6)
    Macbook Pro / 12" Powerbook Mac OS X (10.4.6)

  • Pb of union sql request

    hi,
    I have to execute this sql equest
    Code:
    SELECT ID, NOM, DEFINITION FROM MOT WHERE NOM like 'crédit %'
    UNION SELECT ID, NOM, DEFINITION FROM MOT WHERE NOM LIKE ' crédit' + '%'
    UNION SELECT ID, NOM, DEFINITION FROM MOT WHERE NOM LIKE '%' +" "+ 'crédit' +" "+ '%';
    but it is not possible because the fields NOM, DEFINITION are text fields and not varchar fields and it is not possible to executethis union clause .
    Could you help me to transform this request to another to execute it?
    It is very urgent, if you could help me it would be very kind from you!
    Best regards.
    Nathalie

    Hello,
    Sorry, I just re-read your post and to do the ordering there's a couple of ways I can think of to do it. I'm sure others can come up with something a little bit neater but this should help along the way:
    create table dt_test_order (col1 varchar2(100));
    insert into dt_test_order values('credit');
    insert into dt_test_order values('credit+something');
    insert into dt_test_order values('credit+something else');
    insert into dt_test_order values('something credit+something');
    insert into dt_test_order values('something credit+something else');
    insert into dt_test_order values('something else credit+something else');
    SELECT
         CASE
              WHEN col1 = 'credit' THEN
                   1
              WHEN col1 LIKE 'credit+%' THEN
                   2
              WHEN col1 LIKE '%credit+%' THEN
                   3          
         END col1_order,
         col1
    FROM
         dt_test_order;
    SELECT
         col1
    FROM
         dt_test_order
    ORDER BY
         CASE
              WHEN col1 = 'credit' THEN
                   1
              WHEN col1 LIKE 'credit+%' THEN
                   2
              WHEN col1 LIKE '%credit+%' THEN
                   3          
         END,
         LENGTH(col1);
    SELECT
         col1
    FROM
         dt_test_order
    ORDER BY
         CASE
              WHEN col1 = 'credit' THEN
                   1
              WHEN col1 LIKE 'credit+%' THEN
                   2
              WHEN col1 LIKE '%credit+%' THEN
                   3          
         END,
         col1;
    SELECT
         col1
    FROM
         dt_test_order
    ORDER BY
         CASE
              WHEN col1 = 'credit' THEN
                   1 + LENGTH(col1)
              WHEN col1 LIKE 'credit+%' THEN
                   2 + LENGTH(col1)
              WHEN col1 LIKE '%credit+%' THEN
                   3 + LENGTH(col1)          
         END;There's a few variations on the same theme.
    HTH
    David

Maybe you are looking for

  • SAP BI on Mobile

    Hi There is a lot of excitement about mobile BI especially with the release of the Apple Ipad.  There are two tools we use in class to demonstrate mobile BI to students.  Both tools can be downlaoded from Apple iTunes and are free. The first tool is

  • Change duration of multiple still images in one operation

    Hello Folks. I am trying to change the duration of each image in a sequence of still images. Program: Adobe Premiere Elements 7 Mode: Standard Definition 4/3 ratio File types in use: MOD, AVI, PNG Problem: The product manual states: "To apply the new

  • Replacing internal airport card

    This is my unit: Model Name: PowerBook G4 15" Model Identifier: PowerBook5,6 Processor Name: PowerPC G4 (1.2) Processor Speed: 1.5 GHz Number Of CPUs: 1 L2 Cache (per CPU): 512 KB Memory: 2 GB Bus Speed: 167 MHz Boot ROM Version: 4.9.1f3 I was on a t

  • Compressor Cinema Craft plug-in. What to do with the audio side?

    I've recently installed the Cinema Craft plug-in into Compressor 3.5. Great for improving the quality of my DVDs. But what is the best way to organise the audio compression side and synching it with the output from the Cinema Craft plug-in for the su

  • Playlist display on ipod

    I use my ipod to store music for a dance class, therefore under album name I've listed the name of the dance instead. Would like to be able to set up a playlist for each class for the week, but prefer to see the album (dance name) displayed than the