Schema register get different columns than expected

Hello

I use Oracle 11.2 on a Windows Server 2008-based computer

I expect that when I join an XSD, I'd get an XMLTYPE column AND the columns contained the element in the xsd.

For example running the following script, I would expect that the ROOT table contains a column of ID and INFORMATION table will contain columns INFO_ID and INFO_CONTENT.

What I am doing wrong?

var schemaPath varchar2(256)
var schemaURL  varchar2(256)

begin
  :schemaURL := 'http://localhost/public/xsd/myschema_bin.xsd';
  :schemaPath := '/public/myschema_bin.xsd';
end;
/ 

call dbms_xmlSchema.deleteSchema(:schemaURL,4);

declare
  res boolean;
  xmlSchema xmlType := xmlType(
'                Example XML Schema                                                                                                               '
);
begin
  if (dbms_xdb.existsResource(:schemaPath)) then
      dbms_xdb.deleteResource(:schemaPath);
  end if;
  res := dbms_xdb.createResource(:schemaPath,xmlSchema);
end;
/ 

alter session set events='31098 trace name context forever';

DECLARE
  BINARY_XML boolean:=TRUE;
BEGIN
     IF (BINARY_XML) 
     THEN
        dbms_xmlschema.registerSchema(SCHEMAURL => :schemaURL,
                                      SCHEMADOC => xdbUriType(:schemaPath).getXML(),
                                      LOCAL     => TRUE,
                                      GENTYPES  => FALSE,
                                      GENBEAN   => FALSE,
                                      GENTABLES => TRUE,
                                      FORCE     => FALSE,
                                      OPTIONS   => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
                                      OWNER     => USER);
     ELSE
        dbms_xmlschema.registerSchema(SCHEMAURL => :schemaURL,
                                      SCHEMADOC => xdbUriType(:schemaPath).getXML(),
                                      LOCAL     => TRUE,
                                      GENTYPES  => TRUE,
                                      GENBEAN   => FALSE,
                                      GENTABLES => TRUE,
                                      FORCE     => FALSE,
                                      OWNER     => USER);
     END IF;
END;

Of more when I try to get the information on the table created it just tells me that it is an XMLTYPE, and I expect to specify the XMLTYPE is an instance of the registered scheme is what I get:

desc INFO931_TAB;

Name                           Null     Type                                                                                                                                                                                          

------------------------------ -------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

SYS_NC_ROWINFO$                         XMLTYPE() 

Not that I see a problem, but I really wonder why you choice is XMLType ro. If it's a temporary storage solution a binary XML Securefile XMLType column would be more "reasonable"?

The following might be a solution (not a readable-, but it would be unique)

Select object_id. » -'|| x1.EmpNo | | » -'|| y.addrno as 'UNIQUE_ADDR_IDENT '.

emp_xmltype_table has,.

XMLTABLE (' / employees ')

PASSAGE object_value

COLUMNS

EmpNo to ordinalite,

Employee_Name PATH VARCHAR2 (4000) "name."

employee_age Number (38) PATH 'Age '.

) x 1,

XMLTABLE)

XMLNAMESPACES ('http://www.oracle.com/emp.xsd' AS 'emp').

"Addr/employee / '.

PASSAGE object_value

COLUMNS

addrno for the ordinalite,

VARCHAR2 (30) Street WAY 'Street '.

) y ;

That said, if you follow the odie_63 (How To: load XML in multiple tables data |) Blog of Oracle of Odie), for inclusion in the address table, create an address unique id (ID) and also store information of object_id (& emprno), addrno. By OBJECT_ID & ADDRNO (based on current XSD) you now can still find the original address in EMP_XMLTYPE_TABLE.

Object_id tells you what original XML document to select. EMPRNO (currently always = 1) and ADDRNO will tell you which address (position) in the XML document. As long as the position in the XML document is not littered with (insert address before the need / relational stored address), it should work.

Tags: Database

Similar Questions

  • Different style than expected title

    During the compilation of my source documents using HTML instead of Winhelp 2000, my column 2 text instead of being framed left right justified. Winhelp 2000 Help is properly framed it on the left.

    In the settings of the single HTML Source, in my "Formatting HTML HELP - Microsoft HTML Help" window, I selected "map external style based on an existing style sheet. I took an AfdAdmin.css file name. I thought that it could control the format of title 2 so I examined its contents. For what I assume is the definition of heading 2, I saw the following:

    H2 {margin-right: 18.00pt; margin-top: 6.00pt; margin-bottom: 6.00pt; text-align: left; do-family: Arial; font-size: 12pt; make-weight: bold; margin-top: 12.00pt; margin-bottom: 7.20pt; text-align: left; do-family: Verdana; do-size: 15pt; color: black; make-weight: bold; margin-top: 0.00pt; margin-bottom: 6.00pt; text-align: right; do-family: Arial; font-size: 12pt ;}}

    To me, it seems that there are three fonts associated with position 2. (Why would it?) The third police in the list indicates "text-align: right. I guess that's the problem. I can change that and save the css file manually, but after recompiling, the css file is apparently regenerated and the "text-align: right" again.

    How can I make sure that title 2 is framed on the left in the HTML output?

    Den DiMarco

    Now that I've spent some time in the forum, I think that it probably should have been posted in Robohelp for Word.

    Anyway, to get to the style sheet to fix the problem, the answer was to import the project help in Robohelp html and then change the style of problem through the Format menu > Styles > section 2 > modify > Format > paragraph > Indentation > special. Then change suspended to (none).

    If you use Robohelp for Word, the format paragraph dialog box did not show a 'special' value of hanging. He had demonstrated "(none)".

    I suspect that it is because the style sheet contains several definitions of this style. Then, I want to be able to remove the additional definitions. I'll look for a discussion about this.

  • How to get the value of EV - the diiference between two different columns

    Hello
    I get the difference between the two different columns of two different... as tables (emp.sal - dept.comm)... all I want is I need only the records that a negative gap how get this? Please help me
    Thanks in advance

    If I understand your question right:

    select
      case when emp.sal-dept.comm>=0 then YOUR_VALUE
             else emp.sal-dept.comm
      end difference_value
    from emp,dept...
    

    or do you want to:

    select
      ...
    from emp,dept...
    where emp.sal-dept.comm<0
    

    ?

    Kind regards
    Sayan M.

    Published by: xtender on 19.11.2010 22:29

  • How to get multiple records in a line and a different column

    Hi all

    I am using oracle database 11g

    and I have a two table table_1, table_2
    table_1 has columns

    emp_no
    first name
    middle_name
    last_name
    E-mail

    and table_2 have columns
    emp_no
    phone_type
    Phone_Number

    and having entires

    emp_no phone_type phone_number
    1001 MOB 9451421452
    1001 WEMG 235153654
    1001 652341536 EMG
    1002 MOB 9987526312
    1003 WEMG 5332621456
    1004 59612356 EMG

    Now I want the output of values with the MOB or WEMG phone type in a single line with different columns

    emp_no first_name last_name middle_name officeno mobile e-mail

    1001 score null k 9451421452 235153654 [email protected]
    1002 chagneau gary [email protected] 9987526312 null
    1003 dany craig [email protected] 5332621456 null null
    1004 donald finn sian [email protected] null null



    Can I have any input to achieve this?


    Concerning

    $sid

    Hi Sid,

    Under query will be help for you...

    SELECT tab1.emp_no
    *, first name *.
    *, middle_name *.
    *, last_name *.
    *, email *.
    *, mobile t2.phone_number *.
    *, t3.phone_number officeno *.
    OF tab1
    *, (SELECT Emp_no *)
    *, phone_number *.
    Of THE tab2
    WHERE phone_type = "MOB") t2
    *, (SELECT Emp_no *)
    *, phone_number *.
    Of THE tab2
    WHERE phone_type = "WEMG") t3
    WHERE tab1.emp_no = t3.emp_no
    AND tab1.emp_no = t2.emp_no;

    Thnks,
    cveluri

  • How to display rows of data in different columns?

    I'm new to SQL and currently, that's what I try to do:

    Display multiple lines of data in different columns in the same row

    I have a table like this:

    CREATE TABLE TRIPLEG)

    T # NUMBER (10) NOT NULL,

    STEP # NUMBER (2) NOT NULL,

    DEPARTURE VARCHAR (30) NOT NULL,

    VARCHAR (30) DESTINATION NOT NULL,.

    CONSTRAINT TRIPLEG_PKEY PRIMARY KEY (T #, LEG #).

    TRIPLEG_UNIQUE UNIQUE CONSTRAINT (T #, DEPARTURE, DESTINATION).

    CONSTRAINT TRIPLEG_FKEY1 FOREIGN KEY (T #) REFERENCES TRIP(T#));

    INSERT INTO TRIPLEG VALUES (1, 1, 'Sydney', 'Melbourne');

    INSERT INTO TRIPLEG VALUES (1, 2, 'Melbourne', 'Adélaïde');

    The result should be something like this:

    > T # | ORIGIN | DESTINATION1 |  DESTINATION2

    > 1 | SYDNEY | MELBORUNE | ADELAIDE

    The request must include the ' COUNT(T#) < 3' since I only need to display the records of less than 3. How can I get the results I want to use relational views?

    Thank you!!!

    I replaced the syntax "where" with the syntax 'account '. The reason why I do this is because I want to only display records with a number of travel of less than 3. By defining where the legs #.<=3, the="" result="" will="" be="" all="" the="" records="" of="" the="" tripleg="" table="" since="" each="" record="" could="" also="" have="" leg#="" is="">

    The answer is:

    with t as (SELECT t #,)

    REGEXP_REPLACE)

    LISTAGG (start |) '->' || destination, ' ')

    THE Group (ORDER BY t #, leg #).

    '([^ ]+) \1+',

    "\1") str

    OF tripleg

    HAVING COUNT (T #)<>

    GROUP BY t #)

    Select T #, regexp_substr (str, ' [^->] +', 1, 1) departure

    , regexp_substr (str, ' [^->] +', 1, 2) destination_1

    , regexp_substr (str, ' [^->] +' 1, 3) destination_2

    , regexp_substr (str, ' [^->] +' 1, 4) destination_3

    Thanks to Marty and knani!

  • Cannot use the calendar network unavailable or slow app. The application takes more time to load than expected.

    When you use iCloud on my iMac I get the message "network unavailable or slow. The application takes more time to load than expected. "This has been the case for several hours, but other applications I use (Mail, Contacts, Notes, reminders), all seem to work well.  The

    I have the same message when I try to load the reminders in iCloud. All other applications work correctly. This issue has been ongoing for about a month now.

    Have this problem on my work computer running Windows 7 SP1 Pro and Macbook Air late 2009 w / OS X 10.11

  • Table of different columns

    Hello

    In the attached VI, I am currently getting all tables appears in the same columns. I'm showing every passage in the VI attached to show different columns in the string table.

    Any help will be appreciated.

    Thank you

    hiNi.

    I allocate an array of strings to the final size, then replace the data as you go. Here's the quick rewrite (LabVIEW 8.5).

    (I don't understand your use of the structure of sequence variable, local and while loops. The first two are not necessary and the curls should be FOR loops, because you know the number of iterations in advance.

    (Note also that you must work with chains for the final table. A digital painting is filled with zeros for undersized lines or columns. An empty string for the missing elements seems most appropriate).

  • Taking more time than expected to disconnect from a Server Windows 2008 R2 SP1

    Taking more time than expected to disconnect from a Server Windows 2008 R2 SP1

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • Transmission rate is less than expected for a card (KB940646) of data 3 G WWAN

    The transmission rate is less than expected for a 3 G WWAN data card. In my view, that there is only an update to this problem for Vista. But I'm having the same problem on my Win7. Help?

    Hi SurenSeven,

    Thanks for posting in the Microsoft Community.

    1. have you checked the flow in different computer?
    2. What is the brand and model of the data card, you use?
    3. What is the actual flow, you should receive?

    I suggest to install all the updates that are available in Windows update:

    http://Windows.Microsoft.com/is-is/Windows7/install-Windows-updates

    Update the network adapter drivers:

    http://Windows.Microsoft.com/is-is/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    Refer to this link: why is my Internet connection so slow?
    http://Windows.Microsoft.com/en-in/Windows7/why-is-my-Internet-connection-so-slow

    Hope it will be useful. Incase if you have further queries please reply and we will be happy to help you.

  • While playing some games I get different blue screens. Include messages: WHEA ERROR INCORRIGIBLE and a common one is CLOCK WATCHDOG TIMEOUT.

    While some games I get different blue screens and I can not understand what causes them, this only happens when I play a bit of some games. Include messages: WHEA ERROR INCORRIGIBLE and a common one is CLOCK WATCHDOG TIMEOUT. I tried a new install of Windows 8 and this problem still occurs these games has worked on the same computer with Windows 7.

    Original title: Windows 8 BSOD

    Tom

    They have been linked to the material (since obviously you re-installed), two of them were corrupted because of the speed of the accident.

    If you're a clocking over please return to default (overclocking pushes the material beyond the design of the ists)

    Please run a malwarebytes scan before starting on the underside

    Please download the free version of Malwarebytes.
    Update immediately.
    Do a full scan of the system
    Let us know the results at the end.

    http://www.Malwarebytes.org/products

    Stop 0 x 124 is a hardware error
    If you are overclocking try to reset your settings to standard processor and see if that helps.
    If you keep getting the BSOD here are things more than you may want.

    This is usually hardware related, defective heat, memory or processor even if it is "possible" he is associated (rare) driver.

    Stop 0 x 124 - what it means and what to try

    Synopsis:
    A "stop 0 x 124" is fundamentally different from many other types of bluescreens because it arises from a complaint of material.
    Stop 0 x 124 minidumps contain very little concrete information, and it is therefore necessary to address the problem as a case of material in an unknown state of distress.

    Generic troubleshooting ' Stop 0 x 124 ":

    1) to ensure that none of the hardware components are overclocked. Material which is pushed beyond its design specifications - by overclocking - may malfunction in unpredictable ways.
    (2) ensure that the machine is sufficiently cooled.
    If there is doubt, open the side of the case (be aware of all the relevant conditions guaranteed!) PC and direct an electric fan squarely to the motherboard. Who will rule on most cooling problems (lack of).
    3) update all drivers related to materials: video, sound, RAID (if applicable), NIC... anything that interacts with a piece of hardware.
    It is best to run the latest drivers anyway.
    (4) update the BIOS of your motherboard according to the manufacturer's instructions.
    Their website should provide detailed instructions on the brand and model-specific procedure.
    (5) rarely, bugs in the operating system may cause "false positives" 0 x 124 events where the hardware wasn't complaining, but Windows thought otherwise (because of the bug).
    At the time of writing, Windows 7 does not have to suffer from a defect, but it is nevertheless important to keep Windows up-to-date.
    6) trying (stress) test these hardware components that can be put to the test artificially.
    The most obvious examples are the RAM and HDD (s).
    For the RAM, use the 3 rd-party memtest86 utility to run several hours a test value. (6-8 passes to stress the ram)
    For hard drives, verify if CHKDSK /R finds any problems on (s), including "bad sectors".
    Unreliable RAM, in particular, is mortal, as well as software, and anything other than a 100% clear memory test result is cause for concern. Unfortunately, even a 100% clear result the diagnostic utilities does not guarantee that the RAM is free of any defect - only that none have been encountered during the test passes.


    7) as the last of the non-invasive troubleshooting steps, perform a "Vanilla" Windows reinstallation: just the OS itself without additional applications, games, utilities, updates, new drivers - or ANYTHING that does not come from the Windows 7 disc.
    Who stops working mitigate the problem of the 0 x 124, jump to the next step.
    If you run the "Vanilla" installation long enough to convince yourself that not a single 0 x 124 accident occurred, start installing applications and updates slowly, always stopping between successive additions long enough to get an idea of the question if the machine is still free of 0 x 124 breaks down.
    Smash back, obviously the latest addition of software may be somehow connected to the root cause.
    If the stop error 0 x 124 persist despite the above steps, and the equipment is under warranty, consider to go back and ask for a replacement that does not suffer periodic MCE events.
    Be aware that want to perform the subsequent hardware troubleshooting steps can, in some cases, void your warranty:
    (8) clean and carefully remove the dust inside the machine.
    Reinstall all memory modules and connectors.
    Use a can of compressed air to clean the RAM DIMM supports as much as possible.
    (9) If all else fails, start removing items of hardware one by one in the hope that the culprit is something non-essential that can be eliminated.
    Obviously, this type of testing is much easier if you have access to equivalent components in order to perform swaps.

    If you are in the situation to have completed all the steps above without a resolution of the symptom, unfortunately the most likely reason is that the error message is literally correct - something is fundamentally wrong with the hardware of the machine.

  • How to get the column number

    Hi all,

    I'm sorry to ask this question because I found 2 different answers, tried without result. So before you go crazy, I prefer to ask!

    Thus given mySelection = app.selection [0], how is possible to get the column's selection?

    I tried app.selection [0] .parentTextFrames [0].characters.itemByRange (0, x)

    with x being app.selection [0] .index.

    but then I'm stuck as if I add ".textColumns", I get an error

    I explored the second way using app.selection [0].textColumns.item (1).insertionPoints.item (1), but once I'm stuck again.

    As a beginner I don't understand why there is no simple built-in function to call in order to obtain such a result of base

    Any help would be appreciated

    Thank you

    Ed

    Okay here goes,

    For and only for the linked text frames.

    // For and only for linked text frames.
    // Warning
    // The Good: This will PROBABLY work for you
    // The Bad :THIS IS A REALLY PRIMITIVE METHOD
    // The Ugly: It could fail in COUNTLESS cases
    // Here goes......
    
    var mySelection, textFrame, parentPage, c;
    mySelection = app.selection[0];
    textFrame = mySelection.parentTextFrames[0];
    parentPage = textFrame.parentPage;
    c = 0;
    while(textFrame && textFrame.parentPage === parentPage){
        textFrame = textFrame.previousTextFrame;
        c++;
    }
    
    alert('Column number: ' + c);
    

    Now with regard to the issue of the image columns bound text compared to the blocks of text with multiple columns of text or span. Depends on what you're trying to achieve with your workflow.

    The scripts are around written by me and others who convert multicolumn text executives to related texts related and vice versa.

    If you want to know which is more appropriate you can use with your workflow, then I suggest the regular ID forum.

    HTH

    Trevor

  • How to get a column on the road report

    Hi all

    I have a table that has a leave_start_date and leave_end_date of separate columns. Now, I want to create report to list the employee who took part in some days. I want to show it to every weekend (Friday as weekend bu using NEXT_DAY (TRUNC (to_date (start_date), 'IW'), 'FRIDAY')). There are employees who get up early for most of the week, or in some cases more than a month. so now, I want to show that those who leave details for each weekending. I don't know how to get every weekend for leaves starting November 7, 14 and end 21 January 2014.

    can anyone help me please with the query to get the column weekends like

    ENAME LEAVE_START LEAVE_END End of WEEK
    JOHN
    AUGUST 31, 2014
    21-SEP-2014AUGUST 29, 2014
    JOHN
    AUGUST 31, 2014
    21-SEP-201405-SEP-2014

    ......

    ENAME LEAVE_START LEAVE_END End of WEEK
    JOHN
    AUGUST 31, 2014
    21-SEP-2014
    20-SEP-2014

    .

    Thanks in advance

    Something like that... ?

    with min_max_dates like)

    Select min (LEAVE_START_DATE) min_LEAVE_START_DATE, max (LEAVE_END_DATE) max_LEAVE_END_DATE

    of Leave_details

    )

    -Make all dates for the weekend Fri, sat and Sun for the max min above range

    , weekend_dates as (select case when to_char (level - 1, 'Dy' + min_LEAVE_START_DATE) in ("sat", "Sun", "Sat") then min_LEAVE_START_DATE + level - 1)

    otherwise null terminator weekend_date

    of min_max_dates

    connect by level<=>

    )

    Select ld.ename, ld.leave_start_date, ld.leave_end_date, wd.weekend_date

    of ld leave_details

    weekend_dates WD

    where wd.weekend_date between ld. LEAVE_START_DATE and ld. LEAVE_END_DATE

    and ld.ename = "JOHN".

    order by ename, weekend_date

    ;

  • Get different results even script according to what VM it hits?

    Hello.

    IM starting to Powershell and PowerCLI, so you will know at what level it is on =)

    I get different results depending on what VM my script hits (whetever they may or may not have more than one drive). I do not understand how I can fix this...

    For example, I created 4 new virtual machines.

    TestVMfirst1 have only a single drive

    TestVM02 have 2 drives

    TestVM03 have 3 discs

    TestVM04 have only a single drive

    My goal is to get a CSV with all disks included. I want the name, the data store and SizeGB, this info I get from Get-hard drive.

    When I run my script to select all 4 virtual machines:

    $VMs = get-cluster-name kluster01 : get-vm-name TestVM *

    -----------------------------------------------------------------------------

    $VMs = get-cluster-name kluster01 | Get-vm-name TestVM *.

    $Results = @)

    {foreach ($VM to $VMs)

    $Result = new-object PSObject

    $Result | Add-Member - membertype NoteProperty-name 'Name' - value $VM. Name

    $VMDiskCount = 1

    Get-$VM hard drive | {foreach}

    $disk = $_

    $Result | Add-Member-'Disc ($VMDiskCount) name' name-value $disk. Name - membertype NoteProperty

    $Result | Add-Member-name '($VMDiskCount) Datastore disk' - value $disk. Filename.Split(']') [0]. TrimStart('[') - membertype NoteProperty

    $Result | Add-Member-name 'Disk ($VMDiskCount) SizeGB' - value ([math]: round ($disk.) CapacityKB / 1 MB))-membertype NoteProperty

    $VMDiskCount ++

    }

    $Results += $Result

    }

    $Results | Select-object * | format-table

    -----------------------------------------------------------------------------

    I get the result with max 1 disc:

    Name(1) name of discDisk data store (1)SizeGB disc (1)
    --------------------------------------------
    TestVMfirst1Hard drive 1DS-20140
    TestVM02Hard drive 1DS-20140
    TestVM03Hard drive 1DS-20140

    But if I run the same thing but with TestVM0 * (selects 4-2 VMs):

    $VMs = get-cluster-name kluster01 | Get-vm-name TestVM0 *.

    -----------------------------------------------------------------------------

    $VMs = get-cluster-name kluster01 | Get-vm-name TestVM0 *.

    $Results = @)

    {foreach ($VM to $VMs)

    $Result = new-object PSObject

    $Result | Add-Member - membertype NoteProperty-name 'Name' - value $VM. Name

    $VMDiskCount = 1

    Get-$VM hard drive | {foreach}

    $disk = $_

    $Result | Add-Member-'Disc ($VMDiskCount) name' name-value $disk. Name - membertype NoteProperty

    $Result | Add-Member-name '($VMDiskCount) Datastore disk' - value $disk. Filename.Split(']') [0]. TrimStart('[') - membertype NoteProperty

    $Result | Add-Member-name 'Disk ($VMDiskCount) SizeGB' - value ([math]: round ($disk.) CapacityKB / 1 MB))-membertype NoteProperty

    $VMDiskCount ++

    }

    $Results += $Result

    }

    $Results | Select-object * | format-table

    -----------------------------------------------------------------------------

    I get this result:

    Name(1) name of discDisk data store (1)(1) name of the disc SizeGB disc (2).Disk data store (2)SizeGB disc (2)
    -------------------------------------------- ----------------------------------------
    TestVM02Hard drive 1DS-201Hard 40 2 discDS-20110
    TestVM03Hard drive 1DS-201Hard 40 2 discDS-20210
    TestVM04Hard drive 1DS-20140

    I miss all my disks on TestVM03, I seems that the first VM sets the limit on how many records can be issued in the table... A dirty solution is to create a model on the first target VM disks, but it seems the wrong way to solve my problem.

    Thanks in advance

    You're conclusion is correct, I'm afraid, the first line determines how many properties, you will see.

    Alternatively, you can sort the lines on the number of properties in descending order.

    Something like that

    $Result | Tri-objet-property {($_ |)} Get - Member). {Count of}-descending | Format-Table

  • Find the same value in different columns

    Hello

    I'm trying to figure out how I would get the same value in the same row but in different columns. For example, in the table sometimes report the name is the same as the description. I would like to find all the lines where this is the case.

    Thank you

    Name of the report
    Description
    Date
    Time
    Report 1Report 1DelalandeTTTT
    Report 2Billing reportDelalandeTTTT
    Report 3Report 3DelalandeTTTT

    Hello

    Is that what you want?

    SELECT *- or whatever the columns that you want to

    FROM table_x

    WHERE description = report_name

    ;

    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • See the script generates names of different columns... not even when view desc

    When I describe myself I think I get the following columns

    voucherdetail / / DESC
    Name of Type Null
    ------------------------------ -------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    SERIAL_NUMBER NOT NULL VARCHAR2 (20)
    SECRET_CODE NOT NULL VARCHAR2 (100)
    STATUS VARCHAR2 (2)
    NUMBER OF FACE_VALUE
    NUMBER OF CALL_VALUE
    CREATION_DATE DATE
    VALIDITY_EXTENSION_PERIOD NOT NULL NUMBER (5)
    DATE OF VOUCHER_EXPIRY_DATE
    NUMBER OF TAX_AMOUNT
    NUMBER OF MISC_CHARGE
    NUMBER OF OTHER_CHARGE
    BATCH_NO VARCHAR2 (10)
    DATE OF LAST_MODIFIED_DATE
    LAST_MODIFIED_BY VARCHAR2 (25)
    DATE OF REDEEMDATE
    DATE OF ACTIVATIONDATE



    WHEN I GENERATE MY VIEW SCRIPT GET THE SCRIPT ACCORDING TO:

    CREATE VIEW VOUCHERDETAIL AS SELECT PinSeq, a.Account_id, a.Status,
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B.)
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN = 'A' - RATED VALUE
    AND WETODATE IS NULL
    AND CHARGESHEETCODE = b.CHARGESHEETNO
    ) FACE_Value,.
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B.)
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN = 'B' - CALL VALUE
    AND WETODATE IS NULL
    AND CHARGESHEETCODE = b.CHARGESHEETNO
    ) Call_Value,.
    NVL (A.LAST_MODIFIED_DATE, A.CREATED_DATE) CREATED_DATE, EXPIRYDAYS, NVL(A.EXPIRYDATE,B.EXPIRYDATE) DISPLAYED,
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B.)
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN = 'Q' - AMOUNT OF TAX
    AND WETODATE IS NULL
    AND CHARGESHEETCODE = b.CHARGESHEETNO
    ) Tax_AMOUNT,.
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B.)
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN = 'H' LOAD - MISC
    AND WETODATE IS NULL
    AND CHARGESHEETCODE = b.CHARGESHEETNO
    ) VARIOUS,.
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B.)
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN = 'X' - ANOTHER LOAD
    AND WETODATE IS NULL
    AND CHARGESHEETCODE = b.CHARGESHEETNO
    ) OTHER_CHARGE, a.swhBatchcode, a.LAST_MODIFIED_DATE, a.LAST_MODIFIED_BY, a.ATTRIBUTE_DATE1, a.ATTRIBUTE_DATE2
    Mst_PINDetails a, mst_batchno b
    WHERE a.swhBatchcode = b.swhBatchcode
    ORDER BY PinSeq;




    WHAT I SEE, IT IS THE NAMES OF COLUMNS THAT ARE DISPLAYED WHEN I DESCRIBE MY VIEW OR RUN MY QUERY ON THE VIEW, OR NOT THE SAME IN THE SCRIPT THAT I GENERATE... DUE TO WHICH MY APPLICATION FAILS FRONTEND WHEN I RUN MY REPORT ON THIS POINT OF VIEW

    WHY IS THAT IT IS SHOWING DIFFERENT COLUMN NAMES?

    How can you generate your view script? Which tool?

    For example, if you use TOAD, then check your script options. You can miss a check mark in the setting "columns".
    It might be, that if you put the check mark in the "columns" setting, then your script is as follows:

    CREATE VIEW VOUCHERDETAIL (
    SERIAL_NUMBER,
    SECRET_CODE,
    STATUS,
    FACE_VALUE,
    CALL_VALUE,
    CREATION_DATE,
    VALIDITY_EXTENSION_PERIOD,
    VOUCHER_EXPIRY_DATE,
    TAX_AMOUNT,
    MISC_CHARGE,
    OTHER_CHARGE,
    BATCH_NO,
    LAST_MODIFIED_DATE,
    LAST_MODIFIED_BY,
    REDEEMDATE,
    ACTIVATIONDATE
    )
    AS SELECT PinSeq, a.Account_id, a.Status,
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN='A' --FACE VALUE
    AND WETODATE IS NULL
    AND CHARGESHEETCODE =b.CHARGESHEETNO
    ) FACE_Value,
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN='B' ----CALL VALUE
    AND WETODATE IS NULL
    AND CHARGESHEETCODE =b.CHARGESHEETNO
    ) Call_Value,
    NVL(A.LAST_MODIFIED_DATE, A.CREATED_DATE) CREATED_DATE, EXPIRYDAYS, NVL(A.EXPIRYDATE,B.EXPIRYDATE) EXPIRYDATE,
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN='Q' --TAX AMOUNT
    AND WETODATE IS NULL
    AND CHARGESHEETCODE =b.CHARGESHEETNO
    ) Tax_AMOUNT,
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN='H' --MISC CHARGE
    AND WETODATE IS NULL
    AND CHARGESHEETCODE =b.CHARGESHEETNO
    ) MISC,
    (SELECT A.CHARGEAMT FROM MST_CHARGESHEET A, MST_CHARGE B
    WHERE A.charge_id = B.charge_id
    AND B.CHARGE_WHEN='X' --OTHER CHARGE
    AND WETODATE IS NULL
    AND CHARGESHEETCODE =b.CHARGESHEETNO
    ) OTHER_CHARGE, a.swhBatchcode,a.LAST_MODIFIED_DATE ,a.LAST_MODIFIED_BY, a.ATTRIBUTE_DATE1,a.ATTRIBUTE_DATE2
    FROM mst_PINDetails a, mst_batchno b
    WHERE a.swhBatchcode = b.swhBatchcode
    ORDER BY PinSeq;
    

    CREATE VIEW statement supports explicitly naming them columns. If they are named like that, then the query name/alias columns are ignored.

Maybe you are looking for