WITH the clause as inline view

I m using oracle DB 11.2.0.2.0
I have a question about usage WITH the clause which made a temporary transformation (Materializing) automatically.
I want the query to operate as a point of view WITH clause online because the transactions table materailizing would kill performance.
I m able to see the transformation of the temporary table in the explain output plan.
Have we not all suspicion to stop the transformation of Temp table?

Here is an example of the sample
I have the query union multi (2 requests), couple of table is common to all the union queries. the request should not be materialized. It must operate as a point of view common inline.

WITH ORDERS AS
(SELECT h.order_number,
l.line_number,
l.line_id
order_headers h, order_lines l)
SELECT...
COMMANDS, X, Y
WHERE THE...
UNION ALL
SELECT...
ORDERS, A, B, C
WHERE THE...

Try this...

WITH ORDERS AS
(SELECT /*+ inline */ h.order_number,
l.line_number,
l.line_id
from order_headers h, order_lines l)
...

To achieve the opposite effect, you can use SELECT / * + materialize * /.

However, keep in mind that these tips are undocumented, so use them at your own risk. If you think that Oracle is to choose a bad execution plan, you must sign a deal with Oracle Support to see if this is a bug.

Kind regards
Bob

Tags: Database

Similar Questions

  • Can we use type multiset and with the clause the two

    Please let me know how to use the multiset type and with the clause.

    You need more inlining, as for example in:

    SQL> select *
    from table (cast (multiset (select *
                                from (with t as (select deptno from dept)
                                      select * from t)) as sys.dbms_debug_vc2coll))
    /
    COLUMN_VALUE
    ----------------------------------------
    10
    20
    30
    40
    50                                      
    
    5 rows selected.
    
  • How to communicate with the gsm using lab view

    Please, someone tell me about the following uncertainties:

    1 can anyone tell me about the GSM part in lab mode?

    2. how to communicate with the GSM using lab view?

    3. how to publish my data through GSM using lab view?

    4. how to use ipod to send data to laboratory?

    5. what a DAC suitable for ipod?

    6. how to install the lab for ipod DAC mode?

    without worrying

    FR. mohammad rehan

    rehan_the_great wrote:

    Can u please tell me the minimum requirement of computer (labtop) for the use of labview, like ram size, HARD drive, map chart etc...

    A simple search for "labview requirements" on this site would have given you the information you want.

    http://www.NI.com/LabVIEW/requirements/

  • With the clause of DML (DEC/insert/insert-all)

    Hello


    I have tables t1, t2, t3, t4

    with w
    (
    Select t1.* from t1, t2
    where t1.c1 = t2.c1
    and t1.c2 = t2.c2
    )


    I need to create or insert data in new tables n1 and n2
    Like this..

    Insert into n1
    Select * from w, t3
    where w.c1 = t3.c1

    Insert into n2
    Select * from w, t4
    where w.c2 = t4.c2
    ----

    I will make references the object 'w' several times.
    My concern is because the inserts above are run independently in the same session, the oracle executes the
    with the clause for each reference or runs one time?

    Essentially of iam looking for an insert-all statement
    where it inserts data into multiple tables from target
    something like that...


    Insert into n1
    When
    Select * from w, t3
    where w.c1 = t3.c1
    Insert into n2
    When
    Select * from w, t4
    where w.c1 = t4.c1
    with w
    (
    Select t1.* from t1, t2
    where t1.c1 = t2.c1
    and t1.c2 = t2.c2
    )

    ----
    Usually, I'm doing my basic work before posting on oracle forums, currently iam unable to connect to one
    Oracle sessions. Can someone help me?


    Thanks in advance.

    If your application will have the same number and type of columns, then you can do something like that.

    SQL> create table t1
      2  as
      3  select level no, 'karthick' name
      4    from dual
      5  connect by level <= 5
      6  /
    
    Table created.
    
    SQL> create table t2
      2  as
      3  select no, 'vimal' name
      4    from t1
      5  /
    
    Table created.
    
    SQL> create table t3
      2  as
      3  select no, 'vijay' name
      4    from t1
      5  /
    
    Table created.
    
    SQL> create table t4
      2  as
      3  select no, 'subha' name
      4    from t1
      5  /
    
    Table created.
    
    SQL> create table n1
      2  as
      3  select * from t1 where 1=2
      4  /
    
    Table created.
    
    SQL> create table n2
      2  as
      3  select * from t1 where 1=2
      4  /
    
    Table created.
    
    SQL> insert when view_name = 'v1' then
      2             into n1 values (no, name)
      3         when view_name = 'v2' then
      4                     into n2 values (no, name)
      5  with v
      6  as
      7  (
      8     select t1.*
      9       from t1, t2
     10      where t1.no = t2.no
     11  ),
     12  v1
     13  as
     14  (  select t3.*, 'v1' view_name
     15       from v, t3
     16      where v.no = t3.no
     17  ),
     18  v2
     19  as
     20  (  select t4.*, 'v2' view_name
     21       from v, t4
     22      where v.no = t4.no
     23  )
     24  select * from v1
     25  union all
     26  select * from v2
     27  /
    
    10 rows created.
    
    SQL> select * from n1
      2  /
    
            NO NAME
    ---------- --------
             1 vijay
             2 vijay
             3 vijay
             4 vijay
             5 vijay
    
    SQL> select * from n2
      2  /
    
            NO NAME
    ---------- --------
             1 subha
             2 subha
             3 subha
             4 subha
             5 subha
    
  • WITH THE CLAUSE DOES NOT WORK

    Hello everyone,
    I have the suite Oracle version:

    SQL & gt; selection of version of $ v; *

    BANNER
    ----------------------------------------------------------------
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production
    PL/SQL Release 9.2.0.8.0 - Production
    CORE Production 9.2.0.8.0
    AMT for Solaris: 9.2.0.8.0 - Production Version
    NLSRTL Version 9.2.0.8.0 - Production

    But when I try to run a query with * 'with the clause"* it gives following error:

    SQL & gt; with sam as (select from asap.triangular_reco_aug) *.
    SP2-0734: beginning of unknown command «with sam a...» "- rest of line is ignored.
    SQL & gt;

    Could someone please why this is happening?

    What is your version of SQL * more? If you are using a version earlier than 9.2 then it is probably intercept the syntax error before it happens even to the database that supports.

  • with the clause against table inline

    Dear Experts,

    With clause or inline table are identical from the point of view of performance.

    What query is better?

    query with clause

    with table_getbuckets as
    (
    SELECT * FROM TABLE(pack_activitymonitoring.f_getmatbuckets (start_settle_date,end_settle_date))
    )
    SELECT
          nvl(baludhar.pct,0) AS pctudhar
    FROM t_option opt
    LEFT OUTER JOIN table_getbuckets balinv ON
                opt.a_id = balinv.collateral_a_id AND
                opt.s_id = balinv.s_id
    WHERE opt.for_principal=1
    
    

    query without a clause

    SELECT
          nvl(baludhar.pct,0) AS pctudhar
    FROM t_option opt
    LEFT OUTER JOIN (
                     TABLE(pack_activitymonitoring.f_getmatbuckets
                                                        (start_settle_date,end_settle_date))
      ) balinv ON
                opt.a_id = balinv.collateral_a_id AND
                opt.s_id = balinv.s_id
    WHERE opt.for_principal=1
    
    

    In this case, since you are using only the view inline once, I expect to exercise the same.

    For purposes of readability, I prefer the one that uses the WITH clause.

  • Get ORA-00942 error with the clause, but not when the user sys.

    Hello

    About 3 weeks ago we increased our memary to PGA_aggregate_target = 60 GB, SGA_target = 58 GB Oracle instance. About 1 week ago our cognos user started having errors ORA-00942 for these queries generated with clause, with the same authorization. i.e.

    with 'aBmtQuerySubject4' as
    (select "BANK_NOTE_ADI_INFO_T". ' ' PRINT_BATCH_ID ' 'PRINT_BATCH_ID '.
    'BANK_NOTE_ADI_INFO_T '. ' ' PROCESS_RUN_DT ' 'PROCESS_RUN_DT '.
    'BANK_NOTE_ADI_INFO_T '. ' ' RDP_ID ' 'RDP_ID '.
    'BANK_NOTE_ADI_INFO_T '. ' ' FI_ID ' 'FI_ID '.
    'BANK_NOTE_ADI_INFO_T '. ' ' DEPOSIT_NB ' 'DEPOSIT_NB '.
    'BANK_NOTE_ADI_INFO_T '. ' ' PROCESS_MACHINE_ID ' 'PROCESS_MACHINE_ID '.
    'BANK_NOTE_ADI_INFO_T '. ' ' OUTPUT_STACKER_TYPE_CE ' 'OUTPUT_STACKER_TYPE_CE '.
    'BANK_NOTE_ADI_INFO_T '. ' ' PARTITION_KEY ' 'PARTITION_KEY '.
    'BANK_NOTE_ADI_INFO_T '. ' ' LOAD_ID ' 'LOAD_ID '.
    'BANK_NOTE_ADI_INFO_T '. ' ' SERIAL_NUMBER_ID ' 'SERIAL_NUMBER_ID '.
    'BANK_NOTE_ADI_INFO_T '. ' ' SHIFT_NB ' 'SHIFT_NB '.
    'BANK_NOTE_ADI_INFO_T '. ' ' BANK_NOTE_COUNT_NB ' 'BANK_NOTE_COUNT_NB '.
    of "BOISI '." BANK_NOTE_ADI_INFO_T' 'BANK_NOTE_ADI_INFO_T '.
    )
    'CountResultQuery5' as
    (select count ("aBmtQuerySubject4". "BANK_NOTE_COUNT_NB") 'C_1' "
    , count (1) 'C_2' of 'aBmtQuerySubject4 '.
    After having count (*) > 0)
    Select 'CountResultQuery5 '. "' C_2 ' 'Count1.
    of 'CountResultQuery5 '.
    ;


    with 'aBmtQuerySubject4' as
    (select "BANK_NOTE_ADI_INFO_T". ' ' LOAD_ID ' 'LOAD_ID '.
    of "BOISI '." BANK_NOTE_ADI_INFO_T' 'BANK_NOTE_ADI_INFO_T '.
    )
    'CountResultQuery5' as
    (select count ("aBmtQuerySubject4". "LOAD_ID") 'C_1' "
    , count (1) 'C_2 '.
    of 'aBmtQuerySubject4' having count (*) > 0
    )
    Select 'CountResultQuery5 '. "' C_2 ' 'Count1' of 'CountResultQuery5 '.
    ;

    -output like:

    'BANK_NOTE_ADI_INFO_T '. ' ' PROCESS_RUN_DT ' 'PROCESS_RUN_DT '.
    *
    ERROR at line 3:
    ORA-00942: table or view does not exist


    of "BOISI '." BANK_NOTE_ADI_INFO_T' 'BANK_NOTE_ADI_INFO_T '.
    *
    ERROR at line 3:
    ORA-00942: table or view does not exist

    Since 2 days ago, we get ORA-0403.

    One thing I noticed that the coguser can run above queries correctly after they are run by a user sys...

    Could you please help me on how I can resolve ORA-00942 error?

    Thank you very much, much in advance for all your help and your advice! :-)

    Jihong.

    "One thing I've noticed the coguser can run over queries correctly after they are run by a user sys... »

    Jihong,

    Do you mean that queries can be run successfully as a sys user, or as long as once a sys cognos user user has run the query at least once?

    Gerard

  • WITH THE CLAUSE

    Hi all

    I'm using oracle 11.2.0.4

    I m using this for the purpose of learning

    Below is my table and insert statement

    CREATE TABLE COMPANY (NUMBER EMPLOYEE_ID, EMPLOYEE_NAME VARCHAR2 (30), NUMBER OF MANAGER_ID)

    INSERT INTO THE COMPANY'S VALUES (1, 'FRED', ");

    SOCIETY VALUES (2, 'BARNEY', '1');

    SOCIETY VALUES (3, 'WILMA', '1');

    SOCIETY VALUES (4, 'BETTY', '3');

    INSERT IN THE VALUES(5,'PEBBLES','3') SOCIETY;

    INSERT IN THE VALUES(6,'BAM-BAM','4') SOCIETY;

    INSERT IN THE VALUES(7,'DINO','4') SOCIETY;

    INSERT IN THE VALUES(8,'HOPPY','4') SOCIETY;

    WITH RSFC(CK,PK,LVL,HIER) AS

    (SELECT EMPLOYE_ID, MANAGER_ID, 0 AS LVL, EMPLOYEE_NAME LIKE YESTERDAY)

    SOCIETY

    WHERE MANAGER_ID IS NULL

    UNION ALL

    SELECT EMPLOYE_ID, MANAGER_ID, LVL + 1, YESTERDAY. '/' || EMPLOYEE_NAME

    OF THE RSFC R INNER JOIN COMPANY F

    ON R.CK = F.MANAGER_ID

    )

    WIDTH OF SEARCH FIRST BY CK ORDR SET

    SELECT A.LVL, A.CK, A.PK, A.HIER, ORDR

    THE RSFC HAS

    ORDER BY ORDR

    01FRED1
    121FRED/BARNEY2
    131FRED/WILMA3
    243FRED/WILMA/BETTY4
    253FRED/WILMA/PEBBLES5
    364FRED/WILMA/BETTY/BAM-BAM6
    374FRED, WILMA, BETTY, DINO7
    384FRED, WILMA, BETTY, HOPPY8

    First part, I believe, as well, explains Frank

    hierarchical queries

    next part in bold, I need to understand

    Thanks and respect.

    Guylaine

    Hi, lyly,

    You said that you did not understand the part highlighted in your query.  It looks like the 2 lines are highlighted:

    WIDTH OF SEARCH FIRST BY CK ORDR SET

    SELECT A.LVL, A.CK, A.PK, A.HIER, ORDR

    I guess that it's a typo.  The 2nd day of these lines is just the main SELECT clause; This is the 1st line, the clause of the SEARCH, who really needs an explanation.

    As far as I know, the SEARCH clause is only for the sorting of the results.  In other words, the a WITH recursive clause results will be the same, no matter what you put in the SEARCH clause, or if you omit the clause of RESEARCH.  The only purpose of the clause of RESEARCH is to generate the column command (ORDR in your example), which reflects where each row fits in the graph defined by your recursive query.  (Maybe, if you use non-deterministic user-defined functions, it can be a difference in the results.  Chances are, you never have to worry about this).

    If you do not use a clause in RESEARCH at all, it seems like by default

    WIDTH OF SEARCH FIRST BY NULL...

    In other words, the lines appear in order by level and in no particular order after that.  In your case, that would mean 'FRED' would come first, then "BARNEY" and "WILMA" (not necessarily in that order), followed by all the children of 'BARNEY' or 'WILMA' and so on.  No column order would be generated, so you could not guarantee order in the ORDER BY clause.

    I'm not sure that there is nothing you can do with a clause of RESEARCH that you can not do without a.  In other words, the SEARCH clause automatically generates a command column.  I believe you can still create an equivalent ordering column in the recursive query itself.  In your example, you could say

    ORDER BY lvl, ck

    to get the results sorted the same way.  Sometimes, using a SEARCH clause is much more convenient, and I bet that sometimes it is therefore more effective, too.

    2937991 wrote:

    Hi all

    I'm using oracle 11.2.0.4

    I m using this for the purpose of learning

    Below is my table and insert statement

    CREATE TABLE COMPANY (NUMBER EMPLOYEE_ID, EMPLOYEE_NAME VARCHAR2 (30), NUMBER OF MANAGER_ID)

    INSERT INTO THE COMPANY'S VALUES (1, 'FRED', ");

    SOCIETY VALUES (2, 'BARNEY', '1');

    ...

    As always, thank you for posting this information: it really helps!

    Manager_id is a NUMBER, it would be better if you don't quote it.  In other words, it would be more clear, more effective and less prone to say:

    INSERT INTO COMPANY (EMPLOYE_ID, EMPLOYEE_NAME, MANAGER_ID) VALUES (1, 'FRED', NULL);

    INSERT INTO COMPANY (EMPLOYE_ID, EMPLOYEE_NAME, MANAGER_ID) VALUES (2, 'BARNEY', 1);

    ...

    In this example, the unnecessary quotation marks do not hurt a lot, but they do not help all.

  • Problems with the picture quality when viewing under 100%. First post on the forum.

    Hello everyone. I'm sorry, we have the GET acquainted with this way, but I'm having some problems and this is one of my recent options to get the help.   Let me explain the problem.    Consultation of a file of less than 100% zoom, everything seems jagged as anti aliasing is missing.  Once I'm at 100% zoom, everything seems as it should. The saved file (for example jpeg format) is correct. I can zoom out and seems to be always faithful to the image. The problem is related to photoshop. I installed my latest GPU drivers twice just to be sure, and it was not that.   This problem started last night and I'm not sure how to solve.  If I work on images low resolution, it is not a problem as bad because I will be working on 100% zoom, but I work on images high resolution / paintings. Somewhere around 8000 x 5000 pixels so, work 100% is not that feasible. I have attached an image that illustrates this problem. The right one is zoomed in by the version and the left is the zoom in version.  Yes, the noise is touched by it, evil, but this started last night. until then, everything seemed fine even with the noise or the sharpness of the world output. I can't imagine what I could have done to trigger it.

    test.jpgThat said, I'm at the mercy of more sophisticated here people. I hope I have posted this question in the right section. It's my first post here so I'm sorry if I missed something.   Looking forward to your answers.

    This is a simplistic view, I feel may help you to understand the reality.

    The only time that you look at your image pixels in Photoshop is when you have zoomed in to 100%, it has your look at the pixels of the image in Photoshop for your image at the resolution of your display.

    At any zoom level, looking for an image on a scale that has more or less of pixels that your real picture that too, these are displayed in your display resolution.

    Scaling done by Photoshop is made to display your image is made for good performance, not the best image quality fast interpolation.   That's why at certain levels of zoom image quality seems poorer than at other levels of zoom.

    High resolution screen now have add a new problem.   User interfaces have been designed for screens with resolutions around 100 PPI elements like text, icon and other things like checkboxes, buttons etc. were created size so it would be usable it are more or less fixed 100 dpi.   While Photoshop is designed to scale to your images in order to work well on it is has not been designed with a scalable user interface.  Photoshop can't change its UI regardless of its display high resolution will display image for you.  Display Image in Photoshop has the same resolution as the rest of the User Interface of Photoshop.  Just as there is only one resolution in all layers in a document. CC 2014 2xUI changes.  PS IU is proportional to the image of the area is to the actual resolution of the poster of resolution 1/2.

    Photoshop CC 2014 2 x UI balance all Photoshop User Interface, including the image shown at 200% which is 1/2 the resolution of your screen you cut effectively display pixel count to 1/4 of the number of actual pixels.   Your new running on a low resolution screen.     If your screen has a native resolution 200 PPI you run it at 100 ppi if your display has a 300 PPI resolution you run at 150ppi.    Which goes against the reason for high resolution.  Who would you be able to edit your images to a print resolution.  Adobe cc2x UI will scale the user interface, but not the window image soa inage is 216ppi on the Surface Pro 3 user interface is great and dpoes do not match. screen

    To be able to edit your images to a print resolution you need to display the a a print resolution and you need and demand her can scale its image and its independent user interface display.

    Currently there is no OS interface to have several areas of resolutions on a screen and applications such as Photoshop does not scale UI and Image independently.  OS and Photoshop fits what is displayed.  Executable of Adobe Photoshop is coded in a way that it say Microsoft Windows OS it will load display scaling so that he can use the native resolution of your poster.  Currently only Photoshop CC 2014 offer you with the possibility to run you view at half the resolution.

    Windows fits view you lots of resolution and as several presets.  as 100%, 125%, 150% and 200% half of resolution Adobe.    You can make a Windows registry and add an external manifest Photoshop file of the Microsoft Windows tell to handle display scale.  I have a machine to windows Microsoft Surface Pro 3 Mr. its LCD screen has a resolution of 216PPI.  Windows 8.1 had 4 preset for the scale of its LCD screen.

    Surface Pro 3 screen LCD IPS 12 "display the 9.984603532054124 3:2 aspect ratio" Wide, 6.656402354702749 "high 216.3330765278394 PPI

    Scaling of display predefined Microsoft

    100% 216 2160 x 1440 DPI

    125% 173 1728 x 1152 PPI

    150% 1440 x 960 144 PPI SP3 to the position

    200% 1080 x 720 PPI, 108

    User most these days above 1024 x 768 or better poster and Web pages are often created for pages in 800 x 600 pixels. In order to give a better grip on the resolution and scaling that I change a 800 x 600 document with px grid 25 x 25 on my Surface pro 3

    scale 4 Windows presets and captured using the 2160 x 1140 to bracts screens only to the 100% preset the image window has a 216ppi also note x 2 @ Photoshop UI UI doe does not not on-screen

    Adobe Photoshop CC 2014 2xUI scales the user interface for a display resolution 1/2 but is not suited to the actual screen resolution Image area uses. Information system support Photoshop displays the screen i 1/2 resilution 1080 x 720 but scalet imase to the actual resolution 2160 x 1440. However, the image window is the 216ppi the 108ppi of the UI via the scaling

  • WITH the clause can be used with an insert statement?

    Hello

    Can I use a SQL with a clause of an insert

    Something like
    create table tem (l number)
    
    insert into tem
    (l)
    (with 
      t0  as 
      (Select exp_amt as t0 from exp_main)
    select t0 from t0)
    The declaration itself works fine, but it throws the following error with insert
    Error at Command Line:8 Column:17
    Error report:
    SQL Error: ORA-32034: unsupported use of WITH clause
    32034. 00000 -  "unsupported use of WITH clause"
    *Cause:    Inproper use of WITH clause because one of the following two reasons
               1. nesting of WITH clause within WITH clause not supported yet
               2. For a set query, WITH clause can't be specified for a branch.
               3. WITH clause can't sepecified within parentheses.
    *Action:   correct query and retry
    The reason why I use this format is because we strive to produce sqls to Analytics and queries are generally formed like this. So instead of change requests in bulk, I was hoping that we were able to insert it.

    Please notify

    Thank you
    Sun

    Published by: ryansun on August 14, 2012 01:59

    >
    create table tem (general number);
    table created TEM.

    insert into tem (l)
    with t0
    as
    (Select 1 as double t0)
    Select t0 t0;

    1 inserted rows.

  • Adobe Publishing Suite update v24 is not compatible with the current Adobe Content Viewer

    I updated Adobe Publishing Suite v24 and updated my folio to v24. Now I can't view it in Adobe Content Viewer. When the Adobe Content Viewer will be updated to be compatible with the new v24?

    Bedriftene.no on this post:

    http://forums.Adobe.com/message/4830471#4830471

  • with the Clause in a function

    Hi all

    I use oracle 10 g 2.

    I have a sql query that begins with a "WITH Clause"... Can of use this directly in a function?

    I tried copy paste in the new feature after the BEGIN... but it errors saying CLAUSE provided for in select... when I try including IN the clause... it gives different error...

    Enjoy your sugessions

    Thanks in advance
    H

    You can, perhaps you could post your code so we can take a look?

    See you soon

    Ben

  • How to use an index with the clause 'in '.

    Hi all

    I have a sql statement with "" * in the clause * "."

    for example:
    select emp_id from emp where ename in ("vikas", "krishna", "John", "scott");
    When I check the plan explain he uses the index here even if the statistics was entered. He always goes for the full table scan.
    There is an index created for the ename column.

    Please tell me a technique on how to make use of the index here.


    Thank you and best regards,
    Vikas Krishna

    Vikas,

    What version of Oracle you are running.
    CLAUSE IN will use the index as appropriate.
    In your example Optimizer may decide to use FTS (Full Tablle Scan) for various reasons. May be that the table is very small.
    SE for example below where he uses an index on the CLAUSE IN...
    The essential point being that I made "wide enough" table (in this case including a column of type CHAR) makes use of INDEX more effective than a FTS.

    select * from v$version where rownum < 2;
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    
    create table bigt (c int, s char(100));
    
    insert into bigt select level, 'X' from dual connect by level < 501;
    
    create index bigt_in1 on bigt (c );
    
    exec dbms_stats.GATHER_TABLE_STATS('SUDHAKAR', 'BIGT');
    
    explain plan for select c,s from bigt
    where c in (1,2,3,43,5);
    
    select * from table(dbms_xplan.display);
    
    PLAN_TABLE_OUTPUT
    
    Plan hash value: 238667275
    
    -----------------------------------------------------------------------------------------
    | Id  | Operation                    | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    -----------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT             |          |     5 |   520 |     3   (0)| 00:00:01 |
    |   1 |  INLIST ITERATOR             |          |       |       |            |          |
    |   2 |   TABLE ACCESS BY INDEX ROWID| BIGT     |     5 |   520 |     3   (0)| 00:00:01 |
    |*  3 |    INDEX RANGE SCAN          | BIGT_IN1 |     5 |       |     2   (0)| 00:00:01 |
    -----------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       3 - access("C"=1 OR "C"=2 OR "C"=3 OR "C"=5 OR "C"=43)
    

    VR,
    Sudhakar B.

  • Help with the clause of "default".

    Hi all

    I have a scenario where there is a table with 75 columns. out of the 75 columns, 30 are varchar and 30 are digital. The remaining columns are other types of data when creating the table, that I forgot to mention the default values to varchar and numeric columns.

    Now, approximately 20,000 records are inserted into the table where some records contain NULL varchar and numeric. Now, I want to replace the null with varchar values and digital default values respectively.

    I can change the columns by adding the clause by default now and update the lines of NULL for the default values accordingly. But this process could be very heavy.

    Is there a better way to do this. Please help me.

    Thanks in advance,
    Rambeau

    I want to know that is it possible to set the default values for all columns of type varchar, both using a single SQL statement. Then you can update all the values NULL with default values.

    You are looking for something like this?

    SQL> create table t (empno default 1, ename default 'x') as select cast(null as integer) empno, cast(null as varchar2(10)) ename  from emp where rownum <= 4
    /
    Table created.
    
    SQL> select * from  t
    /
         EMPNO ENAME
    ---------- ----------
    
    4 rows selected.
    
    SQL> update t set empno = default, ename=default
    /
    4 rows updated.
    
    SQL> select * from  t
    /
         EMPNO ENAME
    ---------- ----------
             1 x
             1 x
             1 x
             1 x         
    
    4 rows selected.
    
  • With the clause does not work in SqlPlus for DataBase 11 GR 8 1 material

    I have 11 GR 1 database material, when I connect to my database through SqlPlus (version 8.0.6.0.0) this query
    with x as (select * from areas) select * from x;
    does not work. But when you use SqlPlus provided by 11g, this query works well. This query can run on an older version of SqlPlus?

    user12222356 wrote:
    This client software is installed with Oracle developer 6i form. should I remove all the form developer? Latest version of the form developer is available for 11 GR 1 matter?

    Well, you have problems with the developer of forms?

    I wouldn't recommend delete because you have problems with the SQL more customer that goes with it. I recommend to download the instant client and using them for your needs of sqlplus and leaving the rest products installed on your machine only.

Maybe you are looking for

  • Loading paper folding in Z for Designjet T1100ps

    Cannot load paper folding in z for HP Designjet T1100ps

  • Last FEW imported

    Hello How to create a smart album that would include the last 10 lots of photos that I imported? iPhoto, used to have this feature, do not know if the Photo has the it.

  • Passage of printing in black ink to print ink color and visa versa

    I am running an Imac OSX Yosemite 10.10 operating system.  I want to print in black ink only, so I do not use up my color ink cartridges, but when I opened the impression that there is no option (I see) to make this change.  I've updated my drivers t

  • What cloud services are supported by HP scan to the cloud?

    Hi, I am interested in buying a range of printers HP ePrint enabled with the «Scan to Cloud» feature However, I can't find any information online about what cloud services are supported. I would particularly like to the printer to be able to direct s

  • Very long time tasks relay

    Dear friends I would like to do a test search to simulate a month of rain and Sun. For this I'll use 2 relays, wave of open water for the rain and the other for heating (Sun). The student has the time which rained and the days that has som Sun for a