Tuning Select Statement . field sequence and where clause

Hi All
Are there any general guidelines how to write select < field sequence >where clause < field sequence ? Is that shuld be in order of the field sequence in tables?
And how to use this when we have a view or a inner - join . Is that separate from normal select statement that is using FOR ALL ENTRIES.
Please let me know any general guidelines available on this,
Amol

Hello Amol,
I have another hint:
The statement FOR ALL ENTRIES will package the select statements for every five entries in the internal table. So in comparison to the following code sequence...
LOOP AT itab.
   SELECT * FROM table WHERE key = itab-key.
ENDLOOP
the number of select statements is reduced to 20% with
SELECT * FROM table INTO TABLE ...
     FOR ALL ENTRIES IN itab
     WHERE key = itab-key
If I'm expecting a <i>huge</i>  amount of data a go a step further and create my own packages by building a range table with around 100-500 entries and execute a select there...
LOOP AT itab.
   IF counter < 500.
      APPEND itab-key TO range-tab.   " just code example
   ENDIF.
   IF count >= 500.
      SELECT * FROM table APPENDING TABLE ...
         WHERE key IN range_tab
   ENDIF.
   " adjust and calculate counter
ENDLOOP.
* Don't forget last select statement after loop
Best wishes,
Florin

Similar Messages

  • Sequence of tables in from clause and sequence of "where clause" conditions

    Is Sequence of tables in "From Clause" and sequence of "where clause" conditions matters in 10g for performance?
    Edited by: user6763079 on Jun 1, 2011 3:33 AM

    user6763079 wrote:
    Is Sequence of tables in "From Clause" and sequence of "where clause" conditions matters in 10g for performance?In general it does not matter.
    It could matter if the Rule Based Optimizer (RBO) is used. However this RBO is only used if enforced by a hint or if no table statistics are collected. Starting from 10g the table statistics are automatically selected by a regular database job. So in general the CBO would be used.
    The CBO will consider different access paths. If the number of tables is low enough, then all possible combinations are considered and the order does not make any difference.
    Edited by: Sven W. on Jun 1, 2011 4:00 PM

  • Using Filter and where clause in GoldenGate

    Hi,
    I need to use where clause in extract process.
    The condition i need to use is :- where (CODE LIKE '10%' OR CODE LIKE '0%')
    how to use LIKE operation along with OR in extract.
    I have multiple where conditions these are straight i.e = and <> which are working fine. But LIKE is not working.
    Please do assist for the same.
    Thanks.

    GoldenGate uses FILTER and SQLPREDICATE (and COMPUTE is a variation that can work, depending on how you are trying to manipulate the data).
    To filter data, you can use:
    ● A FILTER or WHERE clause in a TABLE statement (Extract) or in a MAP statement (Replicat).
    ● A SQL query or procedure
    ● User exits
    FILTER comparison operators include:
    Comparison operators:
    > (greater than)
    >= (greater than or equal)
    < (less than)
    <= (less than or equal)
    = (equal)
    <> (not equal)
    WHERE clause permissible operators:
    Column names PRODUCT_AMT
    Numeric values -123, 5500.123
    Literal strings "AUTO", "Ca"
    Built-in column tests @NULL, @PRESENT, @ABSENT (column is null, present or absent in the row). These tests are built into Oracle GoldenGate. See “Considerations for selecting rows with FILTER and WHERE” on page 155.
    Comparison operators =, <>, >, <, >=, <=
    Conjunctive operators AND, OR
    Grouping parentheses Use open and close parentheses ( ) for logical grouping of multiple elements.
    You could try using a GoldenGate string function. You know what the leading one or two characters (0 and 10) are.
    Use the @STREXT function to extract a portion of a string and do a comparison there. Or take care of it using SQLEXEC on replicat (call a function to be able to use LIKE).

  • Qualifying Expression and WHERE CLAUSE Extension

    I would like to know the exact difference between 'Qualifying Expression and WHERE CLAUSE Extension'. Since both are meant to contain some CONDITION that would facilitate the Edit Check's success, So I am sometimes a bit confused with these too as to when to use what.
    Can someone help Please??

    As you can tell from my previous posts (requests!) - I'm a newbie to OC.
    From the documentation - it appears that both Qualifying expression and Where Clause work the same way but the way they execute is different.
    Qualifying expression is applied after the fetch (key fields and question response data from DCM cursor i.e., after the cursor fetches the data) and Where clause filters before QG fetch.
    HTH

  • When formatting a date field in a where clause the template put dot instead of comma

    Hello to Headstart Workers !
    In a query find block the template construct a where clause, in some cases, and i dont know when the template is formatting a date field putting a dot instead of a comma.
    Ex.: to_date('19-01-2001'.'DD-MM-YYYY')
    Anybody knows why or where the template do this.
    Congratulations
    Nelson

    - We created it using the HS utilities.
    - "nls_numeric_character = ,.".
    - it onky happen when the field date is not the first field in the where clause.
    - i can see the problem just after pressing find button, already in the ls_block in last_query.
    - the find_query works normally but cannot edit any line in ls_block.
    Hope that i had helping
    Regards
    Nelson
    null

  • Error while using REMAP_TABLE and WHERE clause  together in IMPDP

    I am trying to move some records from a very large table to another small table.
    I am facing trouble while using REMAP_TABLE and WHERE clause together in IMPDP.
    Problem is data filter is not getting applied and all records are getting imported.
    here is how I have simulated this. please advice.
    CREATE TABLE TSHARRHB.TMP1
      A  NUMBER,
      B  NUMBER
    begin
    Insert into TSHARRHB.TMP1
       (A, B)
    Values
       (1, 1);
    Insert into TSHARRHB.TMP1
       (A, B)
    Values
       (2, 2);
    COMMIT;
    end;
    expdp system/password TABLES=tsharrhb.TMP1 DIRECTORY=GRDP_EXP_DIR DUMPFILE=TMP1.dmp REUSE_DUMPFILES=YES LOGFILE=EXP.log PARALLEL=8
    impdp system/password DIRECTORY=GRDP_EXP_DIR DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY='TSHARRHB.TMP1:"WHERE TMP1.A = 2"'  REMAP_TABLE=TSHARRHB.TMP1:TMP3 CONTENT=DATA_ONLY
    Import: Release 11.2.0.1.0 - Production on Fri Dec 13 05:13:30 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/********@GRD6.RBSG DIRECTORY=GRDP_EXP_DIR DUMPFILE=TMP1.dmp LOGFILE=SSD_93_TABLES_FULL_EXP.log PARALLEL=8 QUERY=TSHARRHB.TMP1:"WHERE TMP1.A = 2" REMAP_TABLE=TSHARRHB.TMP1:TMP3 CONTENT=DATA_ONLY
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    . . imported "TSHARRHB"."TMP3"                           5.421 KB       2 rows
    Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 05:13:33
    here I am expecting only 1 record to get imported but both the records are getting imported. please advice.

    The strange thing compared to your output is that I get an error when I have table prefix in the query block:
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY=SYSADM.TMP1:"WHERE TMP1.A = 2" REMAP_TABLE=SYSADM.TMP1:TMP3 CONTENT=DATA_ONLY
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    ORA-31693: Table data object "SYSADM"."TMP3" failed to load/unload and is being skipped due to error:
    ORA-38500: Unsupported operation: Oracle XML DB not present
    Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Fri Dec 13 10:39:11 2013 elapsed 0 00:00:03
    And if I remove it, it works:
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY=SYSADM.TMP1:"WHERE A = 2" REMAP_TABLE=SYSADM.TMP1:TMP3 CONTENT=DATA_ONLY
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    . . imported "SYSADM"."TMP3"                             5.406 KB       1 out of 2 rows
    Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Fri Dec 13 10:36:50 2013 elapsed 0 00:00:01
    Nicolas.
    PS: as you can see, I'm on 11.2.0.4, I do not have 11.2.0.1 that you seem to use.

  • Difference of 'Specify Fragmentation Content'  and 'where clause Filter ' ?

    What is the difference of ‘Specify Fragmentation Content’ and ‘where clause Filter ‘
    As per my understanding Both looks like limit the data ?

    'Specify Fragmentation Content’ is for Union-ing tables, e.g. one table has data for 2008 while other has 2005-2007, so 'Specify Fragmentation Content’ tells server where to go look for data.
    'Where clause Filter' is for limiting data from the table, e.g. where status = 'Funded'

  • How to dynamically add field name in where clause of select query in web dynpro?

    Hello,
    Can any body tell me how i can use select query with dynamic wheere condition.
    i have a requirement like there are multiple input fields  and i want to select data from two database
    and condition may vary .

    Hi
    In the where clause you need to write like
    WHERE NAME LIKE 'DE%'
    Regards
    Sudheer

  • Select and where clause

    Hi
    I want to write a select statement and in where condition
    1.I want to retrieve the fields which contains a string 'ABAP'
    2.I want to retreive the fields which is equal to space.
    eg;
    SELECT FLD1 FLD2 FLD3 FROM TABLE1 WHERE
       WHERE
       fld1 contains string 'ABAP'
    and fld2 is equal to space.

    Hi
    Yes you can, but you should use the language in the selection on MAKT:
    SELECT MARA~MATNR
    MAKT~MAKTX
    MCH1~CHARG
    MCH1~VFDAT INTO CORRESPONDING FIELDS OF TABLE GT_MATERIALS
    FROM MARA
    INNER JOIN MAKT
    ON MARAMATNR = MAKTMATNR
    INNER JOIN MCH1
    ON MAKTMATNR = MCH1MATNR
    INNER JOIN MVKE
    ON MVKEMATNR = MAKTMATNR
    WHERE MARA~MTART = 'ZDRU'
    AND MARA~LVORM = SPACE
    <b>  AND MAKT~MAKTG LIKE '%DISCONTINUE%'
      AND MAKT~SPRAS  = SY-LANGU "or EN</b>
    AND MVKE~VKORG = 'PUSA'
    AND MVKE~VTWEG = 'SPART'
    AND MVKE~MVGR4 = 92
    AND MCH1~CHARG IN S_CHARG.
    Max

  • Avoid repeating same logic in 'select' and 'where' clauses?

    I'll preface by saying I'm self-taught and have only been fiddling with SQL for a couple of months, so forgive me if this is a dumb question. I have a query written to pull out customers who are configured to have their products stored at the wrong warehouse, according to the first 3 digits of the zip code. Here is an extremely simplified version of a query I'm trying to run:
    select custno, custbuy_zip_cd, custbuy_prim_ship_loc_cd as Warehouse,
    case when substr(custbuy_zip_cd,1,3) in ('839','848') then '20'
    when substr(custbuy_zip_cd,1,3) in ('590','591') then '33'
    end as StdWhse
    from customers
    where case when substr(custbuy_zip_cd,1,3) in ('839','848') then '20'
    when substr(custbuy_zip_cd,1,3) in ('590','591') then '33'
    end <> custbuy_prim_ship_loc_cd
    or (case when substr(custbuy_zip_cd,1,3) in ('839','848') then '20'
    when substr(custbuy_zip_cd,1,3) in ('590','591') then '33'
    end is not null and custbuy_prim_ship_loc_cd is null)
    Now, the query works, but it seems overly convoluted and feels like there must be a way to make it simpler and faster. I'm using the same 'case when' 3 times. Originally, I had thought I could use the aliases from the 'select' clause in the 'where' clause, which would simplify things:
    select custno, custbuy_prim_ship_loc_cd as Warehouse,
    case when substr(custbuy_zip_cd,1,3) in ('839','848') then '20'
    when substr(custbuy_zip_cd,1,3) in ('590','591') then '33'
    end as StdWhse
    from customers
    where StdWhse <> custbuy_prim_ship_loc_cd
    or (StdWhse is not null and custbuy_prim_ship_loc_cd is null)
    I then found out that that caused 'invalid identifier' errors. My first attempt at a solution was to use a subquery in the 'from' clause, but that ran the 'case when' on every single customer instead of the small subset, so it wound up taking much longer even though it looked neater. Any tips on how to clean up that first query to make it run faster?
    this is Oracle 11i, I believe. As a side note, I don't have write access to the database.

    Thanks for all the tips so far - still going through them. You all respond fast! Sorry about using double angle brackets for != and not using code tags, I'll make sure to format my posts properly going forward. I think the double angle brackets messed up the appearance of my original queries a little. Here's how I probably should have pasted my first query in my first post:
    select custno, custbuy_zip_cd, custbuy_prim_ship_loc_cd as Warehouse,
        case when substr(custbuy_zip_cd,1,3) in ('839','848') then '20'
            when substr(custbuy_zip_cd,1,3) in ('590','591') then '33'
        end as StdWhse
    from customers
    where case when substr(custbuy_zip_cd,1,3) in ('839','848') then '20'
            when substr(custbuy_zip_cd,1,3) in ('590','591') then '33'
        end != custbuy_prim_ship_loc_cd
        or (case when substr(custbuy_zip_cd,1,3) in ('839','848') then '20'
            when substr(custbuy_zip_cd,1,3) in ('590','591') then '33'
        end is not null and custbuy_prim_ship_loc_cd is null)The almost unanimous opinion seems to be that I should use a subquery in one way or another, but the problem remains that the only significant logic to narrow down the results is the logic that matches the 'case when' results (which are what the warehouse number should be, based on the zip code) to the current warehouse number. Therefore, it seems like any subquery is going to return my entire list of 600k customers, and take a much longer time than my original (messy) query. At least it has in the test runs I created based on
    Satyaki's and Peter's examples. The query based on my original example takes about 2.5 minutes, and the subquery examples take about 5+ even though they look cleaner.
    to clarify what the query is trying to accomplish, I want it to pull any records where the warehouse number does not equal the correct warehouse number based on zip code (or if the warehouse number is null when it shouldn't be).
    I'll try to create some sample data and sample results. Customers table:
    custno   custbuy_zip_cd  custbuy_prim_ship_loc_cd
    1        59024           20
    2        59024           33desired results:
    custno   custbuy_zip_cd   warehouse   StdWhse
    1        59024            20          33If I could create a table to hold the standard warehouses to join on, the whole thing would be much easier. The full version of the query really has hundreds of zip code prefixes and 5 different warehouses and each account has 4 alternate warehouses as well. However, I'm stuck with read only access so everything has to go right in the query. It wouldn't be the end of the world to just stick with my original query since it's not like it takes hours, and I'll only be running it weekly. I just wanted to make sure there wasn't some other solution that wasn't just cleaner but was also faster.

  • Slow split table export (R3load and WHERE clause)

    For our split table exports, we used custom coded WHERE clauses. (Basically adding additional columns to the R3ta default column to take advantage of existing indexes).
    The results have been good so far. Full tablescans have been eliminated and export times have gone down, in some cases, tables export times have improved by 50%.
    However, our biggest table, CE1OC01 (120 GB), continues to be a bottleneck. Initially, after using the new WHERE clause, it looked like performance gains were dramatic, with export times for the first 5 packages dropping from 25-30 hours down to 1 1/2 hours.
    However, after 2 hours, the remaining CE1OC01 split packages have shown no improvement. This is very odd because we are trying to determine why part of the table exports very fast, but other parts are running very slow.
    Before the custom WHERE clauses, the export server had run into issues with SORTHEAP being exhausted, so we thought that might be the culprit. But that does not seem to be an issue now, since the improved WHERE clauses have reduced or eliminated excessive sorting.
    I checked the access path of all the CE1OC01 packages, through EXPLAIN, and they all access the same index to return results. The execution time in EXPLAIN returns similar times for each of the packages:
    CE1OC01-11: select * from CE1OC01  WHERE MANDT='212'
    AND ("BELNR" > '0124727994') AND ("BELNR" <= '0131810250')
    CE1OC01-19: select * from CE1OC01 WHERE MANDT='212'
    AND ("BELNR" > '0181387534') AND ("BELNR" <= '0188469413')
          0 SELECT STATEMENT ( Estimated Costs =  8.448E+06 [timerons] )
      |
      ---      1 RETURN
          |
          ---      2 FETCH CE1OC01
              |
              ------   3 IXSCAN CE1OC01~4 #key columns:  2
    query execution time [millisec]            |       333
    uow elapsed time [microsec]                |   429,907
    total user CPU time [microsec]             |         0
    total system cpu time [microsec]           |         0
    Both queries utilize an index that has fields MANDT and BELNR. However, during R3load, CE1OC01-19 finishes in an hour and a half, whereas CE1OC01-11 can take 25-30 hours.
    I am wondering if there is anything else to check on the DB2 access path side of things or if I need to start digging deeper into other aggregate load/infrastructure issues. Other tables don't seem to exhibit this behavior. There is some discrepancy between other tables' run times (for example, 2-4 hours), but those are not as dramatic as this particular table.
    Another idea to test is to try and export only 5 parts of the table at a time, perhaps there is a throughput or logical limitation when all 20 of the exports are running at the same time. Or create a single column index on BELNR (default R3ta column) and see if that shows any improvement.
    Anyone have any ideas on why some of the table moves fast but the rest of it moves slow?
    We also notice that the "fast" parts of the table are at the very end of the table. We are wondering if perhaps the index is less fragmented in that range, a REORG or recreation of the index may do this table some good. We were hoping to squeeze as many improvements out of our export process as possible before running a full REORG on the database. This particular index (there are 5 indexes on this table) has a Cluster Ratio of 54%, so, perhaps for purposes of the export, it may make sense to REORG the table and cluster it around this particular index. By contrast, the primary key index has a Cluster Ratio of 86%.
    Here is the output from our current run. The "slow" parts of the table have not completed, but they average a throughput of 0.18 MB/min, versus the "fast" parts, which average 5 MB/min, a pretty dramatic difference.
    package     time      start date        end date          size MB  MB/min
    CE1OC01-16  10:20:37  2008-11-25 20:47  2008-11-26 07:08   417.62    0.67
    CE1OC01-18   1:26:58  2008-11-25 20:47  2008-11-25 22:14   429.41    4.94
    CE1OC01-17   1:26:04  2008-11-25 20:47  2008-11-25 22:13   416.38    4.84
    CE1OC01-19   1:24:46  2008-11-25 20:47  2008-11-25 22:12   437.98    5.17
    CE1OC01-20   1:20:51  2008-11-25 20:48  2008-11-25 22:09   435.87    5.39
    CE1OC01-1    0:00:00  2008-11-25 20:48                       0.00
    CE1OC01-10   0:00:00  2008-11-25 20:48                     152.25
    CE1OC01-11   0:00:00  2008-11-25 20:48                     143.55
    CE1OC01-12   0:00:00  2008-11-25 20:48                     145.11
    CE1OC01-13   0:00:00  2008-11-25 20:48                     146.92
    CE1OC01-14   0:00:00  2008-11-25 20:48                     140.00
    CE1OC01-15   0:00:00  2008-11-25 20:48                     145.52
    CE1OC01-2    0:00:00  2008-11-25 20:48                     184.33
    CE1OC01-3    0:00:00  2008-11-25 20:48                     183.34
    CE1OC01-4    0:00:00  2008-11-25 20:48                     158.62
    CE1OC01-5    0:00:00  2008-11-25 20:48                     157.09
    CE1OC01-6    0:00:00  2008-11-25 20:48                     150.41
    CE1OC01-7    0:00:00  2008-11-25 20:48                     175.29
    CE1OC01-8    0:00:00  2008-11-25 20:48                     150.55
    CE1OC01-9    0:00:00  2008-11-25 20:48                     154.84

    Hi all, thanks for the quick and extremely helpful answers.
    Beck,
    Thanks for the health check. We are exporting the entire table in parallel, so all the exports begin at the same time. Regarding the SORTHEAP, we initially thought that might be our problem, because we were running out of SORTHEAP on the source database server. Looks like for this run, and the previous run, SORTHEAP has remained available and has not overrun. That's what was so confusing, because this looked like a buffer overrun.
    Ralph,
    The WHERE technique you provided worked perfectly. Our export times have improved dramatically by switching to the forced full tablescan. Being always trained to eliminate full tablescans, it seems counterintuitive at first, but, given the nature of the export query, combined with the unsorted export, it now makes total sense why the tablescan works so much better.
    Looks like you were right, in this case, the index adds too much additional overhead, and especially since our Cluster Ratio was terrible (in the 50% range), so the index was definitely working against us, by bouncing all over the place to pull the data out.
    We're going to look at some of our other long running tables and see if this technique improves runtimes on them as well.
    Thanks so much, that helped us out tremendously. We will verify the data from source to target matches up 1 for 1 by running a consistency check.
    Look at the throughput difference between the previous run and the current run:
    package     time       start date        end date          size MB  MB/min
    CE1OC01-11   40:14:47  2008-11-20 19:43  2008-11-22 11:58   437.27    0.18
    CE1OC01-14   39:59:51  2008-11-20 19:43  2008-11-22 11:43   427.60    0.18
    CE1OC01-12   39:58:37  2008-11-20 19:43  2008-11-22 11:42   430.66    0.18
    CE1OC01-13   39:51:27  2008-11-20 19:43  2008-11-22 11:35   421.09    0.18
    CE1OC01-15   39:49:50  2008-11-20 19:43  2008-11-22 11:33   426.54    0.18
    CE1OC01-10   39:33:57  2008-11-20 19:43  2008-11-22 11:17   429.44    0.18
    CE1OC01-8    39:27:58  2008-11-20 19:43  2008-11-22 11:11   417.62    0.18
    CE1OC01-6    39:02:18  2008-11-20 19:43  2008-11-22 10:45   416.35    0.18
    CE1OC01-5    38:53:09  2008-11-20 19:43  2008-11-22 10:36   413.29    0.18
    CE1OC01-4    38:52:34  2008-11-20 19:43  2008-11-22 10:36   424.06    0.18
    CE1OC01-9    38:48:09  2008-11-20 19:43  2008-11-22 10:31   416.89    0.18
    CE1OC01-3    38:21:51  2008-11-20 19:43  2008-11-22 10:05   428.16    0.19
    CE1OC01-2    36:02:27  2008-11-20 19:43  2008-11-22 07:46   409.05    0.19
    CE1OC01-7    33:35:42  2008-11-20 19:43  2008-11-22 05:19   414.24    0.21
    CE1OC01-16    9:33:14  2008-11-20 19:43  2008-11-21 05:16   417.62    0.73
    CE1OC01-17    1:20:01  2008-11-20 19:43  2008-11-20 21:03   416.38    5.20
    CE1OC01-18    1:19:29  2008-11-20 19:43  2008-11-20 21:03   429.41    5.40
    CE1OC01-19    1:16:13  2008-11-20 19:44  2008-11-20 21:00   437.98    5.75
    CE1OC01-20    1:14:06  2008-11-20 19:49  2008-11-20 21:03   435.87    5.88
    PLPO          0:52:14  2008-11-20 19:43  2008-11-20 20:35    92.70    1.77
    BCST_SR       0:05:12  2008-11-20 19:43  2008-11-20 19:48    29.39    5.65
    CE1OC01-1     0:00:00  2008-11-20 19:43                       0.00
                558:13:06  2008-11-20 19:43  2008-11-22 11:58  8171.62
    package     time      start date        end date          size MB   MB/min
    CE1OC01-9    9:11:58  2008-12-01 20:14  2008-12-02 05:26   1172.12    2.12
    CE1OC01-5    9:11:48  2008-12-01 20:14  2008-12-02 05:25   1174.64    2.13
    CE1OC01-4    9:11:32  2008-12-01 20:14  2008-12-02 05:25   1174.51    2.13
    CE1OC01-8    9:09:24  2008-12-01 20:14  2008-12-02 05:23   1172.49    2.13
    CE1OC01-1    9:05:55  2008-12-01 20:14  2008-12-02 05:20   1188.43    2.18
    CE1OC01-2    9:00:47  2008-12-01 20:14  2008-12-02 05:14   1184.52    2.19
    CE1OC01-7    8:54:06  2008-12-01 20:14  2008-12-02 05:08   1173.23    2.20
    CE1OC01-3    8:52:22  2008-12-01 20:14  2008-12-02 05:06   1179.91    2.22
    CE1OC01-10   8:45:09  2008-12-01 20:14  2008-12-02 04:59   1171.90    2.23
    CE1OC01-6    8:28:10  2008-12-01 20:14  2008-12-02 04:42   1172.46    2.31
    PLPO         0:25:16  2008-12-01 20:14  2008-12-01 20:39     92.70    3.67
                90:16:27  2008-12-01 20:14  2008-12-02 05:26  11856.91

  • Is it not possible to give the select single field without an into clause

    Hi,
    i have to check whether my input value( only one filed) is available in the table.
    for eg i need to check whether company code is available in the table t001.
    then i will give .
    data lv_bukrs type t001-bukrs.
    lv_bukrs = 1010.
    select single bukrs from t001 where bukrs = lv_bukrs.
    here its asking for me to give a vaible to store the bukrs that is
    select single bukrs into dummyvalue from t001 where bukrs = lv_bukrs.
    Is it not possible to give the select single fieldname without an into clause

    Its Possible by declaring the tables statement
    <b>tables : AFKO.
    select single * from AFKO where <condition>.</b>
    If SINGLE is specified, the resulting set has a single line. If the remaining additions to the SELECT command select more than one line from the database, the first line that is found is entered into the resulting set. The data objects specified after INTO may not be internal tables, and the APPENDING addition may not be used. The addition ORDER BY can also not be used.
    An exclusive lock can be set for this line using the FOR UPDATE addition when a single line is being read with SINGLE. The SELECT command is used in this case only if all primary key fields in logical expressions linked by AND are checked to make sure they are the same in the WHERE condition. Otherwise, the resulting set is empty and sy-subrc is set to 8. If the lock causes a deadlock, an exception occurs. If the FOR UPDATE addition is used, the SELECT command circumvents SAP buffering.
    Notes
    When SINGLE is being specified, the lines to be read should be clearly specified in the WHERE condition, for the sake of efficiency. When the data is read from a database table, the system does this by specifying comparison values for the primary key.
    If accessing tables for which SAP buffering is planned for single records, the SAP buffer is bypassed if the addition SINGLE is not specified. This behavior depends on the current implementation of the database interface and may change in future releases. In particular, it should not be used to bypass the SAP buffer. You should use the explicit addition BYPASSING BUFFER for this instead.
    The addition SINLGE is not permitted in a subquery.
    Regards
    - Gopi

  • Parsing a field in CFQUERY WHERE clause

    I have a fairly large database that I need to run queries on.  I have one field that represents where store items are stocked by aisle, section and bin. This location field is concatenated with underscore delimiters: aisle_section_bin .  An example location might be 3_25_17.
    I need to run queries where I parse this concatenated location field and essentially ask:
    SELECT *
    FROM MyData
    WHERE aisle = '3' AND section '25' AND bin = '1'
    Could someone please help me with house this would be done?
    My database is fairly large, so I need my queries to be fairly efficient so my server does not timeout.
    Thankyou

    Hi,
    I agree with Claus P; You need to move them to separate fields for a better searching;
    I assume that you have those three values separately and in your database those values are concatenated with underscore.
    If you sure that your data in the database is only with this format 3_25_17; You could think of using SUBSTR functions in oracle and then use ListGetAt Function in Coldfusion to find it.
    Ex: SUBSTR(3_25_17,1) = <cfqueryparam value="#listGetAt(fieldValue, 1, "_")#" />

  • Finding undisplayable characters in a field with a WHERE clause

    Oracle_Rdb7 for_OpenVMS Release 7.0.1. I have a field in my table that has been loaded with data that contains "return/line feed" characters (I'm not sure of the ASCII hex representation) which can't be displayed and show up as "." on my screen. How can I code a WHERE clause that will find these characters, e.g., SELECT * FROM TABLE1 WHERE NAME CONTAINING <here is where I want to put the ASCII hex value for a "return/line feed" character>? Also, how could I get the actual ASCII hex code for these characters to display, e.g., "31" instead of "1"?

    a 'return' is CHR(10) So you can:
    select * from my_table where text_fld like '%'||CHR(10)||'%'

  • Select multiple value in a where clause

    hello,
    im using developer 2000.
    suppose I have several values in a data grid. I want to use all of them in a where clause using IN operator or something. anybody knows how to do that. what I do is always insert all values in the grid into a temporary table and use that table in the where clause. is there any other easy, effective way of doing that?
    select *
    from table1
    where category in (-- I want to select multiple values form a data grid here--)
    thanks in advance.
    bonny.

    Hello Bonny,
    You might consider the use of PL/SQL Collection Types
    The first step in the process is to create a type and a table of that type.
    CREATE OR REPLACE TYPE DateType IS OBJECT ( Arg1 DATE );
    CREATE OR REPLACE TYPE TableList IS TABLE OF DateType;
    DECLARE
    list1 tablelist;
    BEGIN
    SELECT datetype (arg1)
    BULK COLLECT INTO list1
    FROM table1;
    FOR c1 IN (SELECT arg1
    FROM TABLE (CAST (list1 AS tablelist)))
    LOOP
    ---- Your code -----;
    END LOOP;
    END;
    For further insight please refer: http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm
    Regards.

Maybe you are looking for

  • Remote problem - no skipping songs?

    hello all, I've been really enjoying my dashy looking iPod Hi-Fi, but since I updated my iPod this afternoon I can't get the remote to work properly! It still responds when I up/down the volume, but it won't skip any songs or jump to previous ones (t

  • How Do I Fix This Runtime Shared Library Preloading Error?

    Hello, I just finished up my site, and this is the only thing holding me back from publishing it. Whenever I "Test" my site, I get this error: " Your content will not stream. Runtime Shared Library (RSL) preloading will require all of your content to

  • IWeb Images and Assets Switched Around After Publishing to MobileMe

    Hello, A few days ago a podcast I am hosting started acting odd. If I add a new graphic element to the site, ALL graphic elements get moved around, stretched, rotated, etc. This DOESN'T happen when I publish to a folder. I managed to do some workarou

  • HELP! How to validate DATE?

    Hello... how to validate a DATE variable? I have used SimpleDateFormat (dd/MM/yyyy). For some input it worked fine, but for: 12/67/200394 (OK!) <- this is false, right? but not trapped! 1234546 (TRAPPED!) 12/324/1234 (OK!) <- this is false, right? bu

  • Big rectangle on maps staying black

    I'm on an iPhone 6 with iOS 8.1.2. I don't have this problem on my iPad 3 with iOS 8. The problem is that I get a big black rectangle on maps close to where I live (North-Western Spain) on satellite or hybrid view. I can see the whole planet fine zoo