ORDER BY - Table headings

Hi Chaps,
I have a DreamWeaver recordset:
mysql_select_db($database_conndb2, $conndb2);
$query_rsProjects = "SELECT tbl_projects.projid, tbl_projects.projtitle, tbl_customers.custname, tbl_projects.projstart, tbl_projects.projdue, tbl_projects.projstatus, tbl_projects.projstatus, DATE_FORMAT(tbl_projects.projstart, '%d/%m/%Y') as projstart_format, DATE_FORMAT(tbl_projects.projdue, '%d/%m/%Y') as projdue_format, tbl_projects.projpriority FROM tbl_projects, tbl_customers WHERE tbl_projects.FK_custid=tbl_customers.custid AND tbl_projects.projstatus!='Complete' ORDER BY projid ASC";
$rsProjects = mysql_query($query_rsProjects, $conndb2) or die(mysql_error());
$row_rsProjects = mysql_fetch_assoc($rsProjects);
$totalRows_rsProjects = mysql_num_rows($rsProjects);
The data is presented in a table:
<table border="0" cellpadding="0" cellspacing="0" id="tblrepeat_proj">
      <caption>
        <img src="../Images/project.jpg" border="0" /><a href="project_add.php"><img src="../Images/new.jpg" border="0" /></a><a href="#" onclick="print()"><img src="../Images/print.jpg" border="0"/></a>
      </caption>
      <tr>
        <th scope="col">Order No.</th>
        <th scope="col">Document Name</th>
        <th scope="col">Customer</th>
        <th scope="col">Start Date</th>
        <th scope="col">Due Date</th>
        <th scope="col">Status</th>
        <th scope="col">Edit</th>
        <th scope="col">Remove</th>
      </tr>
      <?php do { ?>
      <td>
      <?php echo $row_rsProjects['projid']; ?></span></td>
          <td><a href="project_details.php?id=<?php echo $row_rsProjects['projid']; ?>"><?php echo $row_rsProjects['projtitle']; ?></a></td>
          <td><?php echo $row_rsProjects['custname']; ?></td>
          <td><?php echo $row_rsProjects['projstart_format']; ?></td>
          <td><?php echo $row_rsProjects['projdue_format']; ?></td>
          <td><?php echo $row_rsProjects['projstatus']; ?></span></td>
          <td><a href="project_edit.php?id=<?php echo $row_rsProjects['projid']; ?>">Edit</a></td>
          <td><a href="project_remove.php?id=<?php echo $row_rsProjects['projid']; ?>" onclick="tmt_confirm('Are%20you%20sure%20you%20want%20to%20delete%20this%20record?');retu rn document.MM_returnValue">Remove</a></td>
        </tr>
        <?php } while ($row_rsProjects = mysql_fetch_assoc($rsProjects)); ?>
    </table>
Is it possible to use the table headings as the control for the ORDER BY in the SQL query?

You can, but I find it usually more user friendly to use client side sorting for tables. It's much faster and easy to implement. Just search for client side table sort. Here's one example.
http://www.glendinning.org/webbuilder/sortTable/

Similar Messages

  • How to add the rows formatted as table headings, Tables headings are repeated when a table spans more than one page.

    Hi all,
    i am facing problem while generating Test Result word document after successful execution of TestStand.
    The Problem is :
    i want to add rows Formatted as table headings, table headings are repeated when a table spans more than one page(marked as Red).
    Example:
    Page  No. 1
    |     Test case Number  |  Test Step number      |
    |      100                         |            100                   |
    Page  No. 2
    |     Test case Number  |  Test Step number      |
    |      200                         |            300                   |
    Test Result word document should generate with Table headings(marked as Red) in every pages of the document, but i am not getting as per above example.
    Please through light on this.
    Regards,
    Susa.

    Hi Santiago,
    Thank you very much for your valuable reply.
    i want to generate MS-word report for TestStand after successful testing using MS-word2000.
    Test report contains Actual values, Expected values and Pass/Fail status.
    In my program i have customized all  fields i can able to generate test report which contains Verification engineer name , test mode, test date, start time, end time Actual values, Expected values and Pass/Fail status.etc....
    To put all values of test case number, Test step number, Actual values, Expected values and Pass/Fail status in to table for each time, i will
    insert a row into table every time values arrives, once the table exceedes its page size it moves to the next page, next page should start with table row header  but it start with  values of above said parameters.
    so i'm not able to repeat table row header for each page.
    Please find the attached file for your reference.
    Attched file expected.doc  :   This file contains what i wanted to generate MS-word report. Here table row header "Test Case Number and Test Step Number " is repeated in second page.
    Attached file Actual output from source code.doc   :  This report generated from the source code. Here table row header "Test Case Number and Test Step Number" is not repeated in second page.
    Do you know any property to set "repeat as header row at the top of each page" using MS-word ActiveX in CVI/Labwindows.
    i think this information is sufficient for you,
    Still if you need some information please ask me.
    Thanks
    Susa.
    Attachments:
    Actual output from source code.doc ‏25 KB
    expected.doc ‏26 KB

  • Table headings disappearing in pdf?

    Why are some table headings disappearing when I pdf a Frame 8 file? There is no pattern in the disappearances and each time I pdf the file, a different cell heading disappears. If I create a text box and paste that box over the heading, it shows up fine in the pdf, but that's a dumb way to work. This all started happening in the last month, after I changed computers. Thanks for the help!!

    This is the message I get right now when I save to pdf. If I print to a prn, it doesn't open at all. I used to have a tool that converted the prn automatically at my old job, but there's nothing on the new job's computer and no IT help available. I've been doing a workaround by printing the TOC and the document separately and just adding the TOC to the new pdf, but now when I'm trying to pdf a large document (without TOC) that used to pdf just fine (with TOC), I'm getting the following message. I've just pdf'd chapters 7 & 8 with no problem whatsoever.
    %%[ ProductName: Distiller ]%%
    %%[Page: 1]%%
    %%[Page: 2]%%
    %%[Page: 3]%%
    %%[Page: 4]%%
    %%[Page: 5]%%
    %%[Page: 6]%%
    %%[Page: 7]%%
    %%[Page: 8]%%
    %%[Page: 9]%%
    %%[Page: 10]%%
    %%[Page: 11]%%
    %%[Page: 12]%%
    %%[Page: 13]%%
    %%[Page: 14]%%
    %%[Page: 15]%%
    %%[Page: 16]%%
    %%[Page: 17]%%
    %%[Page: 18]%%
    %%[Page: 19]%%
    %%[Page: 20]%%
    %%[Page: 21]%%
    %%[Page: 22]%%
    %%[Page: 23]%%
    %%[Page: 24]%%
    %%[Page: 25]%%
    %%[Page: 26]%%
    %%[Page: 27]%%
    %%[ Error: undefined; OffendingCommand: pdfmark; ErrorInfo: Rect  ]%%
    Stack:
    /ANN
    /Link
    /Subtype
    /M14.9.42153.Section.Title.Chapter.8.Installing.the.batteries
    /D
    /GoToR
    /S
    /Action
    /Type
    -dict-
    /Action
    [0 0 0]
    /Border
    [7305 2337 9000 2128]
    /Rect
    -mark-
    %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    %%[ Warning: PostScript error. No PDF file produced. ] %%

  • Accessibility: Reading order of tables and anchored frames

    I am creating accessible, tagged (section 508 compliant) PDFs in FrameMaker 9. The reading order for tables and frames is not correct.
    When I view the PDF reading order using Adobe Acrobat Professional or another screen reader, anchored items such as tables and anchored frames are  placed last in the reading order, regardless of where they appear in the document flow or page layout. The reading order skips over all tables and frames, reading all paragraphs on a page first, then reading the tables and frames as the last objects on the page. This logically doesn't make sense to skip over tables/frames as they generally apply to the content that preceeds it.
    For example, the following document structure:
    <Paragraph 1>
    <Table 1>
    <Paragraph 2>
    <Anchored Frame 1>
    <Paragraph 3>
    <Anchor Frame 2>
    <Paragraph 4>
    is being read by assistive technology as:
    <Paragraph 1>
    <Paragraph 2>
    <Paragraph 3>
    <Paragraph 4>
    <Table 1>
    <Anchored Frame 1>
    <Anchor Frame 2>
    I want the document structure to be read correctly as intended.
    In otherwords, the PDFs generated by FrameMaker 9 are not completely accessible because of incorrect reading order output by default. This information is not listed in the VPAT for FrameMaker 9.
    I want to avoid any post processing using Acrobat's Touch Up Reading Order tool. Is there a way to automate updates to reading order?
    Can FrameMaker 9 logically place tables and anchored frames into the correct reading order? How do I adjust these settings?
    Thanks in advance!

    As mentioned above, tables and anchored frames are inserted into thier own paragraph style "Frame". The paragraph style "Frame" is tagged. To my knowledge, there are no options for tagging or not tagging tables or anchored frames.
    Regardless of which paragraph type the table or anchor frame is inserted into, and what that paragraphs tagging settings are, it is still last in the reading order.
    I've tried a variety of options: tagging the "Frame" paragraph style as a sibling, child, and parent of my other paragraphs; I've even tried omitting it from the reading order. None of these options present anchored frames (and tables) in the logical reading order.
    Even images that are inline (within a paragraph; not in thier own paragraph) are not being read as part of the paragraph.  Inline images get skipped over by screen readers and get read at the end of the page, which makes no sense whatsoever.
    All tables and images end up at the end of the reading order (after ALL paragraphs) regardless of the tagging settings.
    Refer to my previous screenshot for a clear diagram of what is happening to the reading order. Each of those anchors is in it's own paragraph style. I want tables and anchored frames to be sequential in the reading order along with paragraphs. (1,2,3,4,5,6 not 1,4,2,5,3,6.)
    I'm using the Tags tab of the "PDF Setup" dialog to adjust these settings. Is there somewhere else I should be making changes to the reading order?
    This is a bit disturbing because FrameMaker touts creating accessible documents and this severe reading order issue impares my ability to do so. I would not consider documents that jump around the page in an illlogical, fixed order, to be accessible. I'm very suprised that no one else has encountered this issue (at least that I can find...)

  • Table Headings in Pivot Table

    Hello Experts,
    is it possible to view Table Headings in Pivot Table Columns? If not is there a work around for this?
    Thank You
    Regards

    Hi ZaidN,
    We do not have any direct option to do this.
    But as a workaround, we can achieve this using the following approach.
    Add a column to the criteria. Use the following in the column formula.
    '<table width="100%" align="center" bordercolor="#C9CBD3"
    frame="void" rules="cols" cellpadding="0" cellspacing="0">
    <tr>
    <td align="center" width = "200">
    <font color = "black">'|| 'This Month' ||'</font>
    </td>
    <td align="center" width = "200">
    <font color = "black">'|| 'Accumulated YTD' ||'</font></td>
    </tr>
    </table>'Where This Month & Accumulated YTD are the table headings.
    Do not forget to change the Data Format to 'HTML'
    Place this column on top of measures labels in Columns Section.
    But, you need to fix the width of all the measure columns and adjust the <td> width accordingly.
    Hope it helps. :)
    Award points if this post helped you..
    Regards,
    Raghu

  • Table headings (tagged in paragraph tags) to be merged as a single entry in the TOC

    Hello, 
    I am working on a previous file done by somebody else. And here, I have the TOC as shown in screen shot below (which looks quiet normal).
    - The body page headings are placed in tables as shown in screen shot below.
    But, the entries when they appear in the TOC, they appear as one (IP31/42 T40) heading.
    How do we tag table headings (in different paragraph tags) and merge them as a single entry in the TOC.
    Also, suprising to note the paragraph tags are different in the TOC and different in the body (for the same headings).
    Below are the different paragraph tags that show up for the headings in the Table of contents:
    Below are the different paragraph tags that show up for the headings in the Table of contents:
    How do we tag table headings (in different paragraph tags) and merge them as a single entry in the TOC.
    Help much needed!!
    Please advice....
    Regards,

    You cannot have two paragraph styles in one paragraph, but you could use different styles in each cell of your table and include them all in the TOC.
    As far as using a different paragraph style for the lisitng in the TOC and the actual text that is picked up, that's very common. It allows you to find many different paragraph styles to include, but have the listings all look the same, and completley different from how the text looks in the body of the book. You'd problay not want 24 pt Bold TOC lisitngs, but that might be appropraite for section headings that you want to pick up.

  • Display Table Headings in 4 Layers..

    Hi All,
    Please help me in displaying the table heading in four layers..
    layer1 | X | Y | Z |
    layer2 | heading 1 | heading 2 | heading 3 | Heading 4 |
    Layer 3 | col name 1 | coln 2 | cl 3 | col 1 | heading 0 | col 1 | heading 0 | heading 1 |
    Layer 4 | | | col 0 | col2 | | col0 |col1 | col 0 | col 1 |
    Let me explain in detail
    in the table heading row 1 we have --> x , y , z
    second row --> x - Heading 1, Heading 2
    in X heading 1 has column name .. heading 2 has two columns which are column names
    Y section has one heading -> Heading has two cols -> second col has two cols
    Z section has one heading -> Heading as three cols -> Col1 direct column name , remaing two heading has two cols each..
    Pelase guide me how to achieve this type of table format..
    Thanks in advance
    Sri

    Hi,
    Try this.
    Table heading:-
    We do not have any direct option to do this.
    But as a workaround, we can achieve this using the following approach.
    Add a column to the criteria. Use the following in the column formula.
    '<table width="100%" align="center" bordercolor="#C9CBD3"
    frame="void" rules="cols" cellpadding="0" cellspacing="0">
    <tr>
    <td align="center" width = "200">
    '|| 'This Month' ||' </td>
    <td align="center" width = "200">
    '|| 'Accumulated YTD' ||'</td>
    </tr>
    </table>'
    Where This Month & Accumulated YTD are the table headings.
    Do not forget to change the Data Format to 'HTML'
    Place this column on top of measures labels in Columns Section.
    But, you need to fix the width of all the measure columns and adjust the <td> width accordingly.
    "Display Column & Table Headings" equivalent for pivot tables?
    Hope this help's
    Thanks,
    Satya

  • How to create index on XMLTYPE ordered collection table?

    I am using Oracle 11.2.0.2.
    Essentially, my XML documents have a 3-level hierarchy:
    event
      +---action  [1:n]
             +---- param   [1:n]
    I am trying to create indexes on ordered collection tables, but can not get the syntax right...
    I have created a table with an object-relational XMLType column:
    CREATE TABLE T_C_RMP_MNTRNG_XML_FULL_IL4 (
      MESSAGE_ID NUMBER(22,0) NOT NULL ENABLE,
      XML_EVAL_ID NUMBER(22,0),
      VIN7 VARCHAR2(7 BYTE),
      FLEET_ID VARCHAR2(50 BYTE),
      CSC_SW_VERSION VARCHAR2(100 BYTE),
      RECEIVED DATE,
      XML_CONTENT SYS.XMLTYPE ,
      DWH_LM_TS_UTC DATE NOT NULL ENABLE,
      CONSTRAINT PK_C_RMP_MNTRNG_XML_FULL_IL4 PRIMARY KEY (MESSAGE_ID)
    ) NOLOGGING TABLESPACE CATALOG
    VARRAY "XML_CONTENT"."XMLDATA"."action" STORE AS TABLE "T_OR_MON_ACTION" (
      NOLOGGING TABLESPACE "CATALOG"
      VARRAY "param" STORE AS TABLE "T_OR_MON_ACTION_PARAM" (
      NOLOGGING TABLESPACE "CATALOG"
      ) RETURN AS LOCATOR
    ) RETURN AS LOCATOR
    XMLTYPE XML_CONTENT STORE AS OBJECT RELATIONAL XMLSCHEMA "http://mydomain.com/cs.xsd" ELEMENT "monitoring";
    I am running the following SELECT:
    SELECT EVENT_ID, ACTION_SUB_ID, MESSAGE_ID, ACTION_TYPE, UNIXTS_TO_DATE(ACTION_TIMESTAMP) ACTION_TIMESTAMP
    FROM T_C_RMP_MNTRNG_XML_FULL_IL4,
    XMLTABLE(
      'for $i1 in /monitoring ,
      $i2 in $i1/action           
      return element r {             
      $i1/eventId,             
      $i2           
      PASSING XML_CONTENT COLUMNS
      EVENT_ID VARCHAR(40) PATH 'eventId',
      ACTION_SUB_ID INTEGER PATH 'action/actionSubId',
      ACTION_TYPE VARCHAR2(100) PATH 'action/type',
      ACTION_TIMESTAMP NUMBER(13,0) PATH 'action/time'
    ) T2
    WHERE (
      EVENT_ID IS NOT NULL AND ACTION_SUB_ID IS NOT NULL
    The explain plan looks like this (sorry, don't know how to get this formatted any "eye-friendlier"):
    | Id  | Operation          | Name                        | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |                             |  1609K|  6316M|       |  6110K  (1)| 20:22:11 |
    |*  1 |  HASH JOIN         |                             |  1609K|  6316M|   111M|  6110K  (1)| 20:22:11 |
    |   2 |   TABLE ACCESS FULL| T_C_RMP_MNTRNG_XML_FULL_IL4 |   582K|   104M|       |  5241   (1)| 00:01:03 |
    |*  3 |   TABLE ACCESS FULL| T_OR_MON_ACTION             |    32M|   117G|       |   105K  (2)| 00:21:08 |
    Predicate Information (identified by operation id):
       1 - access("NESTED_TABLE_ID"="T_C_RMP_MNTRNG_XML_FULL_IL4"."SYS_NC0001300014$")
           filter(CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(XMLCONCAT(SYS_XMLGEN("T_C_RMP_MNTRN
                  G_XML_FULL_IL4"."SYS_NC00017$",NULL,SYS_XMLCONV("T_C_RMP_MNTRNG_XML_FULL_IL4"."SYS_NC00012$",0,32,
                  'EC1EEF23FD023A27E04032A06D930A8D',3,3783,1)),SYS_MAKEXML('EC1EEF23FD023A27E04032A06D930A8D',3780,
                  "T_C_RMP_MNTRNG_XML_FULL_IL4"."SYS_NC00008$","SYS_ALIAS_0"."SYS_NC_ROWINFO$")),'/eventId',NULL),0,
                  0,20971520,0),50,1,2) AS VARCHAR(40) ) IS NOT NULL)
       3 - filter(CAST(TO_NUMBER(TO_CHAR("SYS_ALIAS_0"."actionSubId")) AS INTEGER ) IS NOT NULL)
    Note
       - dynamic sampling used for this statement (level=2)
       - Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)
    The XML schema looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:storeVarrayAsTable="true" oraxdb:flags="2105639" oraxdb:schemaURL="http://mydomain.com/cs.xsd" oraxdb:schemaOwner="MYUSER" oraxdb:numProps="23">
      <xs:element name="monitoring" oraxdb:propNumber="3785" oraxdb:global="true" oraxdb:SQLName="monitoring" oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="monitoring757_TAB" oraxdb:defaultTableSchema="MYUSER">
        <xs:complexType oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER">
          <xs:sequence>
            <xs:element maxOccurs="unbounded" ref="action" oraxdb:propNumber="3780" oraxdb:global="false" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="action756_COLL" oraxdb:SQLCollSchema="MYUSER"/>
            <xs:element ref="reservationType" oraxdb:propNumber="3781" oraxdb:global="false" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="softwareVersion" oraxdb:propNumber="3782" oraxdb:global="false" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="eventId" oraxdb:propNumber="3783" oraxdb:global="false" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="vin" oraxdb:propNumber="3784" oraxdb:global="false" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="action" oraxdb:propNumber="3790" oraxdb:global="true" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="action754_TAB" oraxdb:defaultTableSchema="MYUSER">
        <xs:complexType oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER">
          <xs:sequence>
            <xs:element ref="type" oraxdb:propNumber="3786" oraxdb:global="false" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element maxOccurs="unbounded" ref="param" oraxdb:propNumber="3787" oraxdb:global="false" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="param753_COLL" oraxdb:SQLCollSchema="MYUSER"/>
            <xs:element ref="actionSubId" oraxdb:propNumber="3788" oraxdb:global="false" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="time" oraxdb:propNumber="3789" oraxdb:global="false" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="type" type="xs:string" oraxdb:propNumber="3791" oraxdb:global="true" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="type751_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="param" oraxdb:propNumber="3794" oraxdb:global="true" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="param750_TAB" oraxdb:defaultTableSchema="MYUSER">
        <xs:complexType oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER">
          <xs:sequence>
            <xs:element minOccurs="0" ref="value" oraxdb:propNumber="3792" oraxdb:global="false" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="key" oraxdb:propNumber="3793" oraxdb:global="false" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="value" type="xs:string" oraxdb:propNumber="3795" oraxdb:global="true" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="value748_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="key" type="xs:string" oraxdb:propNumber="3796" oraxdb:global="true" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="key747_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="actionSubId" type="xs:integer" oraxdb:propNumber="3797" oraxdb:global="true" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="actionSubId746_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="time" type="xs:integer" oraxdb:propNumber="3798" oraxdb:global="true" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="time745_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="reservationType" type="xs:string" oraxdb:propNumber="3799" oraxdb:global="true" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="reservationType744_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="softwareVersion" type="xs:string" oraxdb:propNumber="3800" oraxdb:global="true" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="softwareVersion743_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="eventId" type="xs:string" oraxdb:propNumber="3801" oraxdb:global="true" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="eventId742_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="vin" type="xs:string" oraxdb:propNumber="3802" oraxdb:global="true" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="vin741_TAB" oraxdb:defaultTableSchema="MYUSER"/>
    </xs:schema>
    How can I create an index on these ordered collection tables in order to improve performance?
    I found the example at http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb_rewrite.htm#ADXDB5859 but am not able to apply it to this particular case...
    Thank you in advance...

    If the schema is not annotated then xs:integer and xs:string are mapped to NUMBER and VARCHAR2(4000) datatypes, so you have to use those in your query in order to avoid unnecessary typecasting operations.
    You should also use chained XMLTABLEs when accessing a parent/child relationship instead of a FLWOR expression, otherwise the CBO may not rewrite the XQuery correctly (maybe it's fixed in the latest release).
    If you make those changes, the plan should show cleaner predicates :
    SQL> SELECT EVENT_ID, ACTION_SUB_ID, MESSAGE_ID, ACTION_TYPE, ACTION_TIMESTAMP
      2  FROM test_table,
      3  XMLTABLE('/monitoring'
      4    PASSING XML_CONTENT COLUMNS
      5      EVENT_ID         VARCHAR2(4000) PATH 'eventId',
      6      actions          XMLTYPE        PATH 'action'
      7    ) T1,
      8  XMLTABLE('/action'
      9    PASSING actions COLUMNS
    10      ACTION_SUB_ID    NUMBER PATH 'actionSubId',
    11      ACTION_TYPE      VARCHAR2(4000) PATH 'type',
    12      ACTION_TIMESTAMP NUMBER PATH 'time'
    13  ) T2
    14  WHERE EVENT_ID IS NOT NULL
    15  AND ACTION_SUB_ID IS NOT NULL
    16  ;
    Execution Plan
    Plan hash value: 1763884463
    | Id  | Operation                    | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                 |   109 |   220K|     6  (17)| 00:00:01 |
    |   1 |  MERGE JOIN                  |                 |   109 |   220K|     6  (17)| 00:00:01 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| TEST_TABLE      |    11 |   352 |     2   (0)| 00:00:01 |
    |   3 |    INDEX FULL SCAN           | SYS_C007567     |    11 |       |     1   (0)| 00:00:01 |
    |*  4 |   SORT JOIN                  |                 |   109 |   216K|     4  (25)| 00:00:01 |
    |*  5 |    TABLE ACCESS FULL         | T_OR_MON_ACTION |   109 |   216K|     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter("TEST_TABLE"."SYS_NC00012$" IS NOT NULL)
       4 - access("SYS_ALIAS_0"."NESTED_TABLE_ID"="TEST_TABLE"."SYS_NC0000800009$")
           filter("SYS_ALIAS_0"."NESTED_TABLE_ID"="TEST_TABLE"."SYS_NC0000800009$")
       5 - filter("SYS_ALIAS_0"."actionSubId" IS NOT NULL)
    Note
       - dynamic sampling used for this statement (level=2)
    Now, if still necessary, it all boils down to choosing a technique to index NULL values :
    - composite index with a not null or constant column
    - FBI
    - bitmap
    Pick one that best fits your data, selectivity and activity on the tables.

  • CIC Activity and Sales Order Link Tables?

    Hello Experts,
    Can somebody let me know the CRM Customer Interaction Center(CIC) activity and its leading Sales Order Link tables or the data model?
    If somebody could point me to CRM CIC Data model it would be real helpful.
    If you have any document please send it to [email protected]
    Thank you
    Arun

    Arun,
    You should be able to use the document flow function mod : 'CRM_DOC_FLOW_READ_OB' to get any leading documents
    CALL FUNCTION 'CRM_DOC_FLOW_READ_OB'
         EXPORTING
           IV_HEADER_GUID  = wa_activity_guid
         IMPORTING
           ET_DOC_FLOW_WRK = lt_doc_flow.

  • How to add line item to sales order item table?

    Kindly help me the with the below requirement .
    Add line item to sales order(va01) dynamically on click of button. The button is also custom created push button.
    In the above requirement I have added the pushbutton to va01 tcode. But when I click on that button I need to add line item to sales order item table.
    I tried a lot but I am not successful. If possible can u please help on this.
    Regards,
    Rachel

    Hi!
    It's quite easy even in the standard SAP to add a line item for a customer order, I don't think it worth to develop a new button for this.
    However if you wanted to add a line automatically, the you can do the following in the program MV45AFZZ, FORM USEREXIT_SAVE_DOCUMENT.
    You can use similar code, but with some modifications.
    DATA: lv_posnr.
    LOOP AT xvbap.
    MOVE xvbap-posnr TO lv_posnr.   "get the last posnr
    ENDLOOP.
    ADD 10 TO lv_posnr.
    MOVE 'XYZ' TO xvbap-matnr.   "enter your material number here
    MOVE lv_posnr TO xvbap-posnr.
    * fill additinal field data in XVBAP if necessary
    MOVE 'I' TO xvbap-updkz.                  "Insert line
    APPEND xvbap.
    Regards
    Tamá

  • Order of Tables to load

    Hi,
    I have around 300 tables in a database, and I need to load these tables with data. For this I need to know the order of tables to be loaded. Please help me if you have any script or solution that would tell me the order of tables be loaded.
    Thanks in advance

    It's doable. The complexity is mainly in how much or little you know ahead of time about what you are loading. The referential integrity relations between tables is within Oracle so you can know what tables are dependent on table A, and what tables are dependent on those tables, etc., etc. Once you've got that then you can load the data in the proper order (and you might want to put the whole thing in a transaction so other users don't see partial updates). So if you load table A and associated tables once per week or something then you've got the script and can keep re-using it, just changing the data files.
    If you are going to have random tables to load then you'll have to do the same thing for every new table to load. Sure, you can probably create a script to do it all totally driven off of the table to load, but it all depends on how flexible you need to be.

  • Downloaded new numbers app.  Now no table headings.  Solution?  Also in table headings/title want to add current date as did in old numbers.  How do I do it?  Thanks

    Down loaded new numbers app.  Now no table headings.  Solution?  Also. How do I include current date as part of new table heading, I had this included in old numbers spreadsheet title?

    Hi,
    Do you mean no table name?
    Or table header row?
    You can get the current date in a table heading with NOW, which in the formula editor now looks like this:
    Which you can format this way:
    SG

  • Looking for Maintenance order detail table

    hi,
    AFIH - Maintenance order header
    I am looking for a Maintenance order detail table, is there any table.....
    In this same way like VBAK (Header) and VBAP (Item).
    Thanks,
    Fract

    I think there are many tables not one for the Maintenance Order details.
    If you are looking for Object list details then it is OBJK.
    If not let us know what details are you looking for.
    Thanks,
    Chandra Indukuri
    Edited by: Chandra Indukuri on Apr 29, 2010 3:50 AM

  • Display Column & Table Headings in Pivote Table

    Hi,
    Can we display the Table Headings in Pivote Table ??
    There is an option of displaying the same in Table view,is there any way of displaying the same in Pivot Table View??
    Thanks

    Hi,
    Try this.
    Table heading:-
    We do not have any direct option to do this.
    But as a workaround, we can achieve this using the following approach.
    Add a column to the criteria. Use the following in the column formula.
    '<table width="100%" align="center" bordercolor="#C9CBD3"
    frame="void" rules="cols" cellpadding="0" cellspacing="0">
    <tr>
    <td align="center" width = "200">
    '|| 'This Month' ||' </td>
    <td align="center" width = "200">
    '|| 'Accumulated YTD' ||'</td>
    </tr>
    </table>'
    Where This Month & Accumulated YTD are the table headings.
    Do not forget to change the Data Format to 'HTML'
    Place this column on top of measures labels in Columns Section.
    But, you need to fix the width of all the measure columns and adjust the <td> width accordingly.
    "Display Column & Table Headings" equivalent for pivot tables?
    Hope this help's
    Thanks,
    Satya

  • Order of tables in the form clause influences query performance? (ora 9i)

    Hi,
    I have a SQL select with 5 tables in the 'from' clause. On Oracle 9i (and 8i too) if I user a certain table order (bigger tables first, smaller tables last) the query executes fast. If I change the order, then it executes in slow motion. I use cost based optimizing.
    I thought it was just Oracle 8i where I had to take into account such things when writing a query. Does some one know the cause for this? I
    Regards,
    Tamas Szecsy

    And, even in 10GR2, if the optimizer_mode is changed to CHOOSE (the default is ALL_ROWS), the optimizer defaults to RULE based:
    SQL> show parameter optimizer_mode
    NAME                                 TYPE        VALUE
    optimizer_mode                       string      ALL_ROWS
    SQL> alter session set optimizer_mode = choose ;
    Session altered.
    SQL> show parameter optimizer_mode
    NAME                                 TYPE        VALUE
    optimizer_mode                       string      CHOOSE
    SQL> analyze table emp delete statistics ;
    Table analyzed.
    SQL> analyze table dept delete statistics ;
    Table analyzed.
    SQL> set autotrace traceonly explain
    SQL> select e.*, d.* from emp e, dept d where d.deptno = e.deptno (+) ;
    Execution Plan
    Plan hash value: 748780195
    | Id  | Operation                    | Name           |
    |   0 | SELECT STATEMENT             |                |
    |   1 |  NESTED LOOPS OUTER          |                |
    |   2 |   TABLE ACCESS FULL          | DEPT           |
    |   3 |   TABLE ACCESS BY INDEX ROWID| EMP            |
    |*  4 |    INDEX RANGE SCAN          | IDX_EMP_DEPTNO |
    Predicate Information (identified by operation id):
       4 - access("D"."DEPTNO"="E"."DEPTNO"(+))
    Note
       - rule based optimizer used (consider using cbo)
    SQL> analyze table emp compute statistics for table for all indexes for all indexed columns ;
    Table analyzed.
    SQL> analyze table dept compute statistics for table for all indexes for all indexed columns ;
    Table analyzed.
    SQL> select e.*, d.* from emp e, dept d where d.deptno = e.deptno (+) ;
    Execution Plan
    Plan hash value: 748780195
    | Id  | Operation                    | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                |    14 |   826 |     4   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS OUTER          |                |    14 |   826 |     4   (0)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL          | DEPT           |     4 |    76 |     3   (0)| 00:00:01 |
    |   3 |   TABLE ACCESS BY INDEX ROWID| EMP            |     4 |   160 |     1   (0)| 00:00:01 |
    |*  4 |    INDEX RANGE SCAN          | IDX_EMP_DEPTNO |     5 |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("D"."DEPTNO"="E"."DEPTNO"(+))
    SQL> alter session set optimizer_mode = rule ;
    Session altered.
    SQL> select e.*, d.* from emp e, dept d where d.deptno = e.deptno (+) ;
    Execution Plan
    Plan hash value: 748780195
    | Id  | Operation                    | Name           |
    |   0 | SELECT STATEMENT             |                |
    |   1 |  NESTED LOOPS OUTER          |                |
    |   2 |   TABLE ACCESS FULL          | DEPT           |
    |   3 |   TABLE ACCESS BY INDEX ROWID| EMP            |
    |*  4 |    INDEX RANGE SCAN          | IDX_EMP_DEPTNO |
    Predicate Information (identified by operation id):
       4 - access("D"."DEPTNO"="E"."DEPTNO"(+))
    Note
       - rule based optimizer used (consider using cbo)
    SQL> disconnect
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL>

Maybe you are looking for

  • Saving a flash file from cs3 to cs4 ruins the file!

    Last time I used flash for an urgent commission I discovered a very heavy bug, which did cost me half a day of work and nearly the whole commission. What happened: I saved a flash file originally created with Flash CS4 as CS3 because the Actionscript

  • Camera Z-Axis Movement Shutters

    Hello, I've encountered this issue before and was hoping somebody could help me solve this most frustrating quirk. When I do a slow Z-Axis move with a camera, either pushing in or pulling out, near the end of the movement on the easy-ease, the image

  • Class Cast Exception in Portable Remote Object

    Hai guys, I am new to jsp.I have made a simple j2ee application in which i am getting class cast exception in PortableRemoteObject.narrow function. The exception is: org.apache.jasper.JasperException      org.apache.jasper.servlet.JspServletWrapper.s

  • Stolen MacBook Pro...Need Serial Number Help

    My daughter's older MacBook Pro was stolen over Spring Break.  It was purchased used and unfortunately we did not write down the serial number.  The police are asking for it.  It has previously been logged into our families iTunes account.  Is there

  • New to oracle 11g

    Hi, i have 10gr2, but need to migrate to 11g. so I installed 11g at another server for testing it. now, what i need to do? i meant import and export complete from the other server!! Help