Returning 2 counts for columns contents in X/Y axis

I have a table (Workorders) from which I need to display information about 2 columns. Let's say one column is workorder.status and the other one is workorder.worktype. There are about 30 different workorder status and 30 different workorder worktypes. I need to write a query that will return counts for all workorder types for every workorder status (effectively returning, for example, workorder status count on a y axis and worktype count on an x axis.
Example:
Workorder
worktype New Installation Repair Reroute . . . .. . . . . .
Workorder
Status
Requested 15 12 3
Approved 20 2 96
In Progress 25 8 12
I thought of doing a stored procedure so i could take advantage of cursors and make this a little easier. However, i'd like to stay away from this because it will make the process more complex on my reporting tool (Actuate.)
Does anyone have any suggestions for doing this?

Do You want just
SELECT status, worktypes, count(*)
FROM workorders
GROUP BY status, worktypes;and formatting in your reporting tool or formatting by sql:
SELECT status
     , sum(decode(worktypes,'New', 1, null)) New
     , sum(decode(worktypes,'Installation', 1, null))  Installation
     , sum(decode(worktypes,'Repair', 1, null))  Repair
     , sum(decode(worktypes,'Reroute', 1, null))  Reroute
FROM workorders
GROUP BY status;?

Similar Messages

  • Inbox search not returning item count for certain category's entered...

    I suspect there's a BADI for this but at present the item count is not being displayed for two of the six category's that we have. In other words four of the Categories used do show the number of items returned, but two do not. Can anyone give me some pointers as what controls this?.
    Jas

    Originally Posted by Preston Stephenson
    Is there only one item in your Mailbox folder?
    Typically yes, I'm using an account to test with so I am controlling the contents of the inbox directly.
    Originally Posted by Preston Stephenson
    If there is only the one item, how was it created
    (what was used to send the item)?
    For all of the tests I've done with you so far, the items were created using the SOAP API. (sendItemRequest)
    Since I didn't think of this previously, I went back and sent out an email using the GroupWise Web Access, as well as the GroupWise client. In both cases, I still did not receive the status with the email.
    Originally Posted by Preston Stephenson
    If you send an item using the GroupWise client,
    what does that item look like?
    Here is my SOAP request.
    Code:
    <ns3:getItemsRequest xmlns="http://schemas.novell.com/2005/01/GroupWise/types" xmlns:ns2="http://schemas.novell.com/2005/01/GroupWise/events" xmlns:ns3="http://schemas.novell.com/2005/01/GroupWise/methods">
    <ns3:container>folders</ns3:container>
    <ns3:view>subject status</ns3:view>
    <ns3:count>-1</ns3:count>
    </ns3:getItemsRequest>
    Here is the soap response when attempting to retrieve an email from my inbox. The email is the only item in my inbox, and was sent using the GroupWise client.
    Code:
    <gwm:getItemsResponse>
    <gwm:items>
    <gwt:item xsi:type="gwt:Mail">
    <gwt:id>53316A23.gw2012domain.gw2012po.100.1666178.1.25F.1@1:7.gw2012domain.gw2012po.100.0.1.0.1@16</gwt:id>
    <gwt:sid>607</gwt:sid>
    <gwt:container>7.gw2012domain.gw2012po.100.0.1.0.1@16</gwt:container>
    <gwt:source>received</gwt:source>
    <gwt:subject>ClientSent</gwt:subject>
    </gwt:item>
    </gwm:items>
    <gwm:status>
    <gwt:code>0</gwt:code>
    </gwm:status>
    </gwm:getItemsResponse>
    Thanks,
    Jon

  • Workflow Status column for new content type

    Hi,
    Initially I had a document library and several workflows associated with it. After that I created a new content type inheriting Folder content type. My existing workflows could be started and work fine with any item of this new content type except anything
    related to the workflow status column, such as "Automatically update workflow status to the current stage name", or workflow action "Set workflow status". If I use the OOTB Folder content type, everything's fine. But I need custom fields
    for folder as well.
    The workflows can be started then it seems unreasonable that they are not associated with the items of the new content type, considering I set my new content type to be the child of the existing Folder content type. So why any item under this new content
    type does not have the workflow status column? I've tried removing the workflow from the list and publishing back using SPD without success.
    I also notice that when you associate a new content type to a document library/list which has some custom columns, you cannot edit those columns to be used in the new content type. You need to delete those columns and recreate them, then the option "Add
    to all content types" is there. Is this expected design?
    Thanks

    Hi,
    According to your post, an error occurred when you created a custom Edit form for new content type.
    We can do as follows:
    1.Add the MyNameSpace.MyNewEditPage dll file into GAC(C:\Windows\assembly).
    2. Execute the iisreset command.
    We can create a new content type using visual studio 2012/2013.
    http://www.sharepoint-journey.com/sharepoint-list-content-types-and-site-columns.html
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Calcualting Count for a particular column

    Hi All,
             I have this internal table which has records from jcds table.Now i want to display two fields on o/p screen.The fields are 1.Delivered By
    2.No of deliveries for this user.
    No w can someone please tell me how to calculate count as there will be multiple users who would have delivered and there is no field mentioning the count for the user.
    Thanks in advance,
    Saket.

    Hi,
    check the code below
    TYPES: BEGIN OF s_itab,
            usnam TYPE cdusername,
            total TYPE int4,
          END OF s_itab.
    DATA: total TYPE int4,
          wa_itab TYPE s_itab,
          itab TYPE STANDARD TABLE OF s_itab WITH HEADER LINE.
    SELECT DISTINCT usnam
       FROM jcds
    INTO CORRESPONDING FIELDS OF TABLE itab.
    LOOP AT itab INTO wa_itab.
      SELECT COUNT(*)
        FROM jcds
        INTO total
    WHERE usnam = wa_itab-usnam.
      wa_itab-total = total.
      MODIFY itab FROM wa_itab.
    ENDLOOP.
    LOOP AT itab INTO wa_itab.
      WRITE : /1 wa_itab-usnam,
               30 wa_itab-total.
    ENDLOOP.
    Regards,
    Amit

  • How do I show a count for rows that don't exist?

    Hi, I'm trying to count the number of records grouped by rank(B,C,R),month,and year. Basically, anytime a part fails testing a record is entered which records the failure Rank and occurrence date. A record is only inserted if a part failed for specific rank. So not all 3 ranks will have entries. I'm able to count all ranks by month,year that do exist. But how do I get values of 0 for the ranks that don't exist? I just created a table qa_rank that has just one column rank with 3 records(b,c,r). but its not being used as of now. rank is just a column in qa_occ record.Here is my query.
    select to_char(occdate,'YY') as yr, to_char(occdate,'MM') as mn,
    rank, count(occdate)
    from qa_occ
    where q.occdate between '1-Apr-2005'and '31-Mar-2006'
    and q.supplier = '11107'
    group by to_char(q.occdate,'YY'),to_char(q.occdate,'MM'),q.rank
    order by to_char(q.occdate,'YY'),to_char(q.occdate,'MM')
    which returns this
    YY MM RANK COUNT(OCCDATE)
    05 09 C 2
    05 10 C 2
    05 11 C 1
    05 11 R 1
    06 01 C 3
    06 02 C 1
    06 03 B 1
    06 03 C 2
    I need it to return C,B,R for everymonth. If no records exist then the count for the month,rank should be 0. Any ideas? Thanks.

    something like:
    SQL> with qa_occ as
      2  (select to_date('09/15/2005','mm/dd/yyyy') occdate, 'B3661-RYPX-A000' part, 'C' rank, 4 indexpoints from dual
      3   union all
      4   select to_date('09/25/2005','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
      5   union all
      6   select to_date('10/11/2005','mm/dd/yyyy') occdate, null part, 'C' rank, 7 indexpoints from dual
      7   union all
      8   select to_date('10/20/2005','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
      9   union all
    10   select to_date('11/11/2005','mm/dd/yyyy') occdate, null part, 'C' rank, 4 indexpoints from dual
    11   union all
    12   select to_date('11/18/2005','mm/dd/yyyy') occdate, 'B3661-RYPX-A000' part, 'R' rank, 0 indexpoints from dual
    13   union all
    14   select to_date('01/11/2006','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
    15   union all
    16   select to_date('01/25/2006','mm/dd/yyyy') occdate, '3511-RNA0-0111' part, 'C' rank, 4 indexpoints from dual
    17   union all
    18   select to_date('01/27/2006','mm/dd/yyyy') occdate, '3511-RNA0-0111' part, 'C' rank, 4 indexpoints from dual
    19   union all
    20   select to_date('02/15/2006','mm/dd/yyyy') occdate, '3511-RNA0-0111' part, 'C' rank, 4 indexpoints from dual
    21   union all
    22   select to_date('03/07/2006','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
    23   union all
    24   select to_date('03/14/2006','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
    25   union all
    26   select to_date('03/15/2006','mm/dd/yyyy') occdate, '3511-RNA0-0111' part, 'B' rank, 13 indexpoints from dual)
    27  select * from qa_occ;
    OCCDATE   PART            R INDEXPOINTS
    15-SEP-05 B3661-RYPX-A000 C           4
    25-SEP-05 B3661-RYP-A000  C           4
    11-OCT-05                 C           7
    20-OCT-05 B3661-RYP-A000  C           4
    11-NOV-05                 C           4
    18-NOV-05 B3661-RYPX-A000 R           0
    11-JAN-06 B3661-RYP-A000  C           4
    25-JAN-06 3511-RNA0-0111  C           4
    27-JAN-06 3511-RNA0-0111  C           4
    15-FEB-06 3511-RNA0-0111  C           4
    07-MAR-06 B3661-RYP-A000  C           4
    14-MAR-06 B3661-RYP-A000  C           4
    15-MAR-06 3511-RNA0-0111  B          13
    13 rows selected.
    assuming that there are only three ranks available B, C,and R we considered this as a lookup values. now in the query below we incorporate an inline view for the lookup values:
    SQL> with qa_occ as
      2  (select to_date('09/15/2005','mm/dd/yyyy') occdate, 'B3661-RYPX-A000' part, 'C' rank, 4 indexpoints from dual
      3   union all
      4   select to_date('09/25/2005','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
      5   union all
      6   select to_date('10/11/2005','mm/dd/yyyy') occdate, null part, 'C' rank, 7 indexpoints from dual
      7   union all
      8   select to_date('10/20/2005','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
      9   union all
    10   select to_date('11/11/2005','mm/dd/yyyy') occdate, null part, 'C' rank, 4 indexpoints from dual
    11   union all
    12   select to_date('11/18/2005','mm/dd/yyyy') occdate, 'B3661-RYPX-A000' part, 'R' rank, 0 indexpoints from dual
    13   union all
    14   select to_date('01/11/2006','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
    15   union all
    16   select to_date('01/25/2006','mm/dd/yyyy') occdate, '3511-RNA0-0111' part, 'C' rank, 4 indexpoints from dual
    17   union all
    18   select to_date('01/27/2006','mm/dd/yyyy') occdate, '3511-RNA0-0111' part, 'C' rank, 4 indexpoints from dual
    19   union all
    20   select to_date('02/15/2006','mm/dd/yyyy') occdate, '3511-RNA0-0111' part, 'C' rank, 4 indexpoints from dual
    21   union all
    22   select to_date('03/07/2006','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
    23   union all
    24   select to_date('03/14/2006','mm/dd/yyyy') occdate, 'B3661-RYP-A000' part, 'C' rank, 4 indexpoints from dual
    25   union all
    26   select to_date('03/15/2006','mm/dd/yyyy') occdate, '3511-RNA0-0111' part, 'B' rank, 13 indexpoints from dual)
    27  select qa.yr, qa.mn,
    28         decode(qa.rank,lk.rank,qa.rank,lk.rank) rank,
    29         sum(decode(qa.rank,lk.rank,qa.cnt,0)) cnt
    30    from (select to_char(qo.occdate,'YY') as yr,
    31                 to_char(qo.occdate,'MM') as mn,
    32                 qo.rank,
    33                 count(qo.occdate) cnt
    34            from qa_occ qo
    35          group by to_char(qo.occdate,'YY'),
    36                   to_char(qo.occdate,'MM'),
    37                   qo.rank) qa,
    38         (select 'B' rank from dual
    39          union all
    40          select 'C' rank from dual
    41          union all
    42          select 'R' rank from dual) lk
    43  group by qa.yr, qa.mn, decode(qa.rank,lk.rank,qa.rank,lk.rank)
    44  order by qa.yr, qa.mn, decode(qa.rank,lk.rank,qa.rank,lk.rank);
    YR MN R        CNT
    05 09 B          0
    05 09 C          2
    05 09 R          0
    05 10 B          0
    05 10 C          2
    05 10 R          0
    05 11 B          0
    05 11 C          1
    05 11 R          1
    06 01 B          0
    06 01 C          3
    06 01 R          0
    06 02 B          0
    06 02 C          1
    06 02 R          0
    06 03 B          1
    06 03 C          2
    06 03 R          0
    18 rows selected.
    SQL>

  • How to get row count(*) for each table that matches a pattern

    I have the following query that returns all tables that match a pattern (tablename_ and then 4 digits). I also want to return the row counts for these tables.
    Currently a single column is returned: tablename. I want to add the column RowCount.
    DECLARE @SQLCommand nvarchar(4000)
    DECLARE @TableName varchar(128)
    SET @TableName = 'ods_TTstat_master' --<<<<<< change this to a table name
    SET @SQLCommand = 'SELECT [name] as zhistTables FROM dbo.sysobjects WHERE name like ''%' + @TableName + '%'' and objectproperty(id,N''IsUserTable'')=1 ORDER BY name DESC'
    EXEC sp_executesql @SQLCommand

    The like operator requires a string operand.
    http://msdn.microsoft.com/en-us/library/ms179859.aspx
    Example:
    DECLARE @Like varchar(50) = '%frame%';
    SELECT * FROM Production.Product WHERE Name like @Like;
    -- (79 row(s) affected)
    For variable use, apply dynamic SQL:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Rows count all tables:
    http://www.sqlusa.com/bestpractices2005/alltablesrowcount/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How to display the field name in the tabulated view for a content query web part

    I have added a content query web part changed the web part file to include custom columns imported and reffered itemstyle.xsl
    to include the tabulated view for the content query.
    However the way it is displayed is such that only the content is displayed.
    As i am using a tabular view wto display the data, i want to display their field names as well.

    Hi  ,
    According to your description, my understanding is that you need to display the field in the tabulated view for a content query web part.
    For your issue, please refer to the code as below:
    <xsl:template name="VendorCustomStyle" match="Row[@Style='VendorCustomStyle']" mode="itemstyle">
    <html>
    <table width="100%">
    <xsl:if test="count(preceding-sibling::*)=0">
    <tr>
    <td width="8%" valign="top"><div class="item"><b>Vendor ID</b></div></td>
    <td width="12%" valign="top"><div class="item"><b>Vendor Name</b></div></td>
    <td width="50%" valign="top"><div class="item"><b>Vendor Description</b></div></td>
    <td width="10%" valign="top"><div class="item"><b>Vendor Country</b></div></td>
    <td width="10%" valign="top"><div class="item"><b>Vendor Date</b></div></td>
    <td width="10%" valign="top"><div class="item"><b>Created By</b></div></td>
    </tr>
    </xsl:if>
    <tr>
    <td width="8%" valign="top"><div class="item"><xsl:value-of select="@VendorID" /></div></td>
    <td width="12%" valign="top"><div class="item"><xsl:value-of select="@Title" /></div></td>
    <td width="50%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Description" disable-output-escaping="yes" /></div></td>
    <td width="10%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Country" /></div></td>
    <td width="10%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Date" /></div></td>
    <td width="10%" valign="top"><div class="item"><xsl:value-of select="@Author" /></div></td>
    </tr>
    </table>
    </html>
    </xsl:template>
    For more information, please have a look at the blog:
    http://www.codeproject.com/Articles/756834/Customizing-the-Content-Query-Web-Part-and-Item-St
    http://msdn.microsoft.com/en-us/library/ms497457.aspx
    http://clarksteveb.hubpages.com/hub/Customized-Content-Query-Web-Part-CQWP-in-SharePoint-2007-with-results-Tabbed-Grouped-and-in-an-HTML-Table
    http://blog.sharepointexperience.com/customitemstyle/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Count of columns in a query

    All,
    Could anyone please clarify me on , how we can count the column's which were used in a query.
    Ex:    SELECT ENAME, EMPNO, SAL , JOB FROM EMP; 
    --Here in the above query, I have taken 4 columns(counted manually) . Instead of counting it manually is there any other way.
    Thanks

    It sounds like you're creating dynamic SQL.  Why are you doing that?  Dynamic SQL's would seem to indicate you don't know the structure of your own database or that your application design is trying to be generic rather than being designed in proper modularized units (1 unit does 1 task, not multiple generic tasks).  99.999% of the time, people using dynamic SQL indicates that they are misusing the database or haven't designed things properly.
    If there's really a valid reason for using dynamic SQL, then of course you can do it properly and use all the features of Oracle to get information about the dynamic SQL, but that means not using something as poor as EXECUTE IMMEDIATE (which is often abused by most people), or trying to use ref cursors within PL/SQL (which are more intended for 3rd party application layers).  The power of dynamic SQL is gained from using the DBMS_SQL package... as in the following simplistic example...
    SQL> set serverout on
    SQL> create or replace procedure run_query(p_sql IN VARCHAR2) is
      2    v_v_val     varchar2(4000);
      3    v_n_val     number;
      4    v_d_val     date;
      5    v_ret       number;
      6    c           number;
      7    d           number;
      8    col_cnt     integer;
      9    f           boolean;
    10    rec_tab     dbms_sql.desc_tab;
    11    col_num     number;
    12    v_rowcount  number := 0;
    13  begin
    14    -- create a cursor
    15    c := dbms_sql.open_cursor;
    16    -- parse the SQL statement into the cursor
    17    dbms_sql.parse(c, p_sql, dbms_sql.native);
    18    -- execute the cursor
    19    d := dbms_sql.execute(c);
    20    --
    21    -- Describe the columns returned by the SQL statement
    22    dbms_sql.describe_columns(c, col_cnt, rec_tab);
    23    --
    24    -- Bind local return variables to the various columns based on their types
    25
    26    dbms_output.put_line('Number of columns in query : '||col_cnt);
    27    for j in 1..col_cnt
    28    loop
    29      case rec_tab(j).col_type
    30        when 1 then dbms_sql.define_column(c,j,v_v_val,2000); -- Varchar2
    31        when 2 then dbms_sql.define_column(c,j,v_n_val);      -- Number
    32        when 12 then dbms_sql.define_column(c,j,v_d_val);     -- Date
    33      else
    34        dbms_sql.define_column(c,j,v_v_val,2000);  -- Any other type return as varchar2
    35      end case;
    36    end loop;
    37    --
    38    -- Display what columns are being returned...
    39    dbms_output.put_line('-- Columns --');
    40    for j in 1..col_cnt
    41    loop
    42      dbms_output.put_line(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
    43                                                                                when 2 then 'NUMBER'
    44                                                                                when 12 then 'DATE'
    45                                                       else 'Other' end);
    46    end loop;
    47    dbms_output.put_line('-------------');
    48    --
    49    -- This part outputs the DATA
    50    loop
    51      -- Fetch a row of data through the cursor
    52      v_ret := dbms_sql.fetch_rows(c);
    53      -- Exit when no more rows
    54      exit when v_ret = 0;
    55      v_rowcount := v_rowcount + 1;
    56      dbms_output.put_line('Row: '||v_rowcount);
    57      dbms_output.put_line('--------------');
    58      -- Fetch the value of each column from the row
    59      for j in 1..col_cnt
    60      loop
    61        -- Fetch each column into the correct data type based on the description of the column
    62        case rec_tab(j).col_type
    63          when 1  then dbms_sql.column_value(c,j,v_v_val);
    64                       dbms_output.put_line(rec_tab(j).col_name||' : '||v_v_val);
    65          when 2  then dbms_sql.column_value(c,j,v_n_val);
    66                       dbms_output.put_line(rec_tab(j).col_name||' : '||v_n_val);
    67          when 12 then dbms_sql.column_value(c,j,v_d_val);
    68                       dbms_output.put_line(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
    69        else
    70          dbms_sql.column_value(c,j,v_v_val);
    71          dbms_output.put_line(rec_tab(j).col_name||' : '||v_v_val);
    72        end case;
    73      end loop;
    74      dbms_output.put_line('--------------');
    75    end loop;
    76    --
    77    -- Close the cursor now we have finished with it
    78    dbms_sql.close_cursor(c);
    79  END;
    80  /
    Procedure created.
    SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
    Number of columns in query : 4
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    SAL : 2450
    Row: 2
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    SAL : 5000
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    SAL : 1300
    PL/SQL procedure successfully completed.
    SQL>

  • Problem w/: Error while getting estimated row count for view

    JDev 10.1.3 - Steps
    1. created a ADF VO w/ one bind variable vNAME.
    2. Created a basic jspx page, use the data control pal. to drop in VO w/ executeparam option. Use the data control pal to drop in VO w/ ADF Read-Only Table w/ select and sort option. Selected all VO columns in table.
    3. Following Error msg occurs when running jspx page -
    oracle.jbo.DMLException: Error while getting estimated row count for view object CategoryView, statement SELECT count(1) FROM (SELECT
    CATEGORY.CATID CATID,
    CATEGORY.NAME NAME,
    CATEGORY.PICTURE PICTURE,
    CATEGORY.ACTIVE ACTIVE
    FROM
    CATEGORY
    WHERE
    (CATEGORY.NAME LIKE UPPER(:vName)||'%')) .
    Tested SQL Statement in SQL Worksheet works ok (with a Value replacing ':vName').
    Can anyone advise - seems to be a straight forward process that is returning this error msg. I have tried variations of the SQL stmt with no luck. The jspx page errors when the ADF Read-Only Table is added.

    I seem 2 have the same error, in a slightly different situation.
    I have a view which subclasses a Entity with a history column 'CreatedOn'. When performing a quick search/filter on this column I get the same error. The ADF app is build on a DB2 database, so no named parameters here. Instead invalid SQL is created when executing the estimated row count. The WHERE clause contains 'CreatedOn = null', should be 'CreatedOn is null'. Furthermore the input of my quick search is not filled in this clause.
    Any help would be appreciated

  • Getting problem to generate loop for column of dataTable

    Hi everyone, I am trying to generate loop for column of my <h:dataTable rows="1" width="1500" value="#{HeadWiseCrimeMngBean.distName}" styleClass="font-right" var="drow" border="1" >
    <c:forEach begin="0" end="#{HeadWiseCrimeMngBean.vectSize}" items="#{HeadWiseCrimeMngBean.counter}" var="index">
    <h:column>
    <h:panelGrid border="0" cellpadding="0" cellspacing="0" width="100" columns="1" >
    <h:outputText value="#{drow[index]}"/>
    </h:panelGrid>
    </h:column>
    </c:forEach>
    </h:dataTable>
    but I am getting java.lang.NumberFormatException: exception
    my bean file is
    * HeadWiseCrimeMngBean.java
    * Created on August 27, 2007, 3:10 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package gov.nic.cipa.cipaweb.dto;
    import gov.nic.cipa.cipaweb.bo.HeadWiseCrimeReportBO;
    import gov.nic.cipa.cipaweb.bo.Utility;
    import java.sql.Date;
    import java.util.Vector;
    * @author cipa
    public class HeadWiseCrimeMngBean {
    /** Creates a new instance of HeadWiseCrimeMngBean */
    public HeadWiseCrimeMngBean() {
    private Date startDate = Utility.getDatabaseDate(Utility.getDateFromDateString("01-07-2007"));
    private Date endDate = Utility.getDatabaseDate(Utility.getDateFromDateString("10-07-2007"));
    private String statCode = "08";
    private String recp = "ps";
    private String distCode="173";
    private String type="w";
    private Vector vec = new Vector();
    public Date getStartDate() {
    return startDate;
    public void setStartDate(Date startDate) {
    this.startDate = startDate;
    public String getStateCode() {
    return statCode;
    public void setStateCode(String statCode) {
    this.statCode = statCode;
    public String getRecp() {
    return recp;
    public void setRecp(String recp) {
    this.recp = recp;
    public Date getEndDate() {
    return endDate;
    public void setEndDate(Date endDate) {
    this.endDate = endDate;
    public String getDistCode() {
    return distCode;
    public void setDistCode(String distCode) {
    this.distCode = distCode;
    public String getType() {
    return type;
    public void setType(String type) {
    this.type = type;
    public int getVectSize() {
    Vector ver=null;
    int size=0;
    HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
    if(recp.equals("dist"))
    try {
    ver=hcrbo.districtVect(getStateCode());
    } catch (Exception ex) {
    ex.printStackTrace();
    }else if(recp.equals("ps"))
    try {
    ver=hcrbo.psVect(getDistCode());
    } catch (Exception ex) {
    ex.printStackTrace();
    size=ver.size();
    return size;
    public int getCurrentYear()
    int year=0;
    HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
    try {
    year=hcrbo.getCurrentYear(getStartDate());
    } catch (Exception ex) {
    ex.printStackTrace();
    return year;
    public int getPreviousYear()
    int year=0;
    HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
    try {
    year=hcrbo.getPreviousYear(getStartDate());
    } catch (Exception ex) {
    ex.printStackTrace();
    return year;
    public Vector getDistName() throws Exception
    Vector distName=null;
    HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
    try {
    distName=hcrbo.districtVect(getStateCode());
    } catch (Exception ex) {
    ex.printStackTrace();
    return distName;
    public int getCounter() throws Exception
    int c=0;
    return c++;
    public Vector getDetails() throws Exception{
    HeadWiseCrimeReportBO bo = new HeadWiseCrimeReportBO();
    vec = bo.reterive(getStartDate(),getEndDate(),getStateCode(),getDistCode(),getType(),getRecp()) ;
    return vec;
    public static void main(String ar[])
    Vector v=new Vector();
    int p;
    HeadWiseCrimeMngBean a=new HeadWiseCrimeMngBean();
    try{
    p=a.getVectSize();
    System.out.println(p);
    }catch(Exception e)
    {e.printStackTrace();}
    can anyone please tell me what is wrong here.............
    Message was edited by:
    mayank_mca

    I've been able to create all of these except the profile. It works for non DEFAULT named profiles. For instance we have a profile named DBA_PROF that I can create the DDL for.

  • Issue returning a count of rows in a SELECT QUERY...

    I am working in Oracle 11.2g and I have a query where I want to return the count of DAILY records as well as WEEKLY records for specific marketers.
    Here is my query:
    Select     Mka_Mktr_No, 
              Case When Rat_Freq_Cd = 'D' Then Count(*) Else 0 End DailyCount,
              case when Rat_Freq_Cd = 'W' then count(*) Else 0 End WeeklyCount
            From     Marketer_Account, Acct
            Where     Mka_Exp_Dt >= '01-NOV-2012'
            And     Mka_Eff_Dt <= '30-NOV-2012'
            and     rat_acct_no = mka_acct_no
            And     Rat_Usage_Cd = 'P'
            and rat_freq_cd != 'M'
            Group By Mka_Mktr_No, Rat_Freq_Cd
            Order By Mka_Mktr_No;I would prefer to have the results show up on the SAME row, but instead I get the following results:
    MKA_MKTR_NO            DAILYCOUNT             WEEKLYCOUNT           
    10005                  68                     0                     
    10005                  0                      2                      Note how it shows each count on a seperate row. Is there a way to tweak the query to show the counts on the same row:
    MKA_MKTR_NO            DAILYCOUNT             WEEKLYCOUNT           
    10005                  68                     2       and not have two seperate rows?
    Many thanks,
    Sean

    Don't group by rat_freq_cd
    SQL> with test_data as
      2      (
      3      select 1 mka_mktr_no, 'W' rat_freq_cd from dual union all
      4      select 1 mka_mktr_no, 'W' rat_freq_cd from dual union all
      5      select 1 mka_mktr_no, 'D' rat_freq_cd from dual union all
      6      select 2 mka_mktr_no, 'D' rat_freq_cd from dual union all
      7      select 2 mka_mktr_no, 'W' rat_freq_cd from dual union all
      8      select 2 mka_mktr_no, 'W' rat_freq_cd from dual union all
      9      select 2 mka_mktr_no, 'D' rat_freq_cd from dual union all
    10      select 2 mka_mktr_no, 'D' rat_freq_cd from dual union all
    11      select 2 mka_mktr_no, 'D' rat_freq_cd from dual union all
    12      select 3 mka_mktr_no, 'D' rat_freq_cd from dual union all
    13      select 3 mka_mktr_no, 'D' rat_freq_cd from dual union all
    14      select 3 mka_mktr_no, 'W' rat_freq_cd from dual union all
    15      select 3 mka_mktr_no, 'D' rat_freq_cd from dual union all
    16      select 3 mka_mktr_no, 'D' rat_freq_cd from dual union all
    17      select 3 mka_mktr_no, 'W' rat_freq_cd from dual
    18      )
    19  select
    20      mka_mktr_no,
    21      count(case when rat_freq_cd = 'D' then rat_freq_cd end) dailycount,
    22      count(case when rat_freq_cd = 'W' then rat_freq_cd end) weeklycount
    23  from
    24      test_data
    25  group by mka_mktr_no;
    MKA_MKTR_NO DAILYCOUNT WEEKLYCOUNT
              1          1           2
              2          4           2
              3          4           2

  • Need help with a SQL qurey that returns multiple rows for one record?

    I have the following query where I use a CASE WHEN clause to determine the date of a shift that begins with "FRLO" on day1 - day14 of the pay period. It works great if a schedule record contains one day that begins "FRLO", but if more than one day is "FRLO" then it only returns the first day it finds and not the others. Is there some way to get the query to return a ron for every day 1 - 14 that begins "FRLO"? System if Oracle 11G
    Order of the results is not important as this is part of a larger query that orders the results.
    Thanks in advance for any help,
    George
    SELECT s.empid,
    CASE
    WHEN UPPER (SUBSTR (s.Day1, 0, 4)) = 'FRLO'
    THEN
    pp.startpp
    WHEN UPPER (SUBSTR (s.Day2, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 1
    WHEN UPPER (SUBSTR (s.Day3, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 2
    WHEN UPPER (SUBSTR (s.Day4, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 3
    WHEN UPPER (SUBSTR (s.Day5, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 4
    WHEN UPPER (SUBSTR (s.Day6, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 5
    WHEN UPPER (SUBSTR (s.Day7, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 6
    WHEN UPPER (SUBSTR (s.Day8, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 7
    WHEN UPPER (SUBSTR (s.Day9, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 8
    WHEN UPPER (SUBSTR (s.Day10, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 9
    WHEN UPPER (SUBSTR (s.Day11, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 10
    WHEN UPPER (SUBSTR (s.Day12, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 11
    WHEN UPPER (SUBSTR (s.Day13, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 12
    WHEN UPPER (SUBSTR (s.Day14, 0, 4)) = 'FRLO'
    THEN
    pp.startpp + 13
    END
    startdate,
    NULL starttime,
    NULL endtime,
    8 hours,
    0 minutes
    FROM schedules s
    JOIN
    payperiods pp
    ON pp.periodid = s.periodid
    WHERE UPPER (SUBSTR (s.Day1, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day2, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day3, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day4, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day5, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day6, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day7, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day8, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day9, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day10, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day11, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day12, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day13, 0, 4)) = 'FRLO'
    OR UPPER (SUBSTR (s.Day14, 0, 4)) = 'FRLO';
    CURRENT OUTPUT
    EMPID STARTDATE STARTTIME ENDTIME HOURS MINUTES
    753738, 3/25/2013 , , ,8 ,0
    753740, 3/25/2013 , , ,8 ,0
    753748, 3/25/2013 , , ,8 ,0
    DESIRED OUTPUT
    EMPID STARTDATE STARTTIME ENDTIME HOURS MINUTES
    753738, 3/25/2013 , , ,8 ,0
    753740, 3/25/2013 , , ,8 ,0
    753748, 3/25/2013 , , ,8 ,0
    753738, 3/26/2013 , , ,8 ,0
    753740, 3/26/2013 , , ,8 ,0
    753740, 3/28/2013 , , ,8 ,0
    753748, 1/1/2013 , , ,8 ,0
    753738, 4/3/2013 , , ,8 ,0
    753748, 4/3/2013 , , ,8 ,0
    CREATE TABLE SCHEDULES
    SCHEDULEID NUMBER(12) NOT NULL,
    EMPID NUMBER(12) NOT NULL,
    PERIODID VARCHAR2(6 BYTE) NOT NULL,
    AREAID NUMBER(12) NOT NULL,
    DAY1 VARCHAR2(50 BYTE),
    DAY2 VARCHAR2(50 BYTE),
    DAY3 VARCHAR2(50 BYTE),
    DAY4 VARCHAR2(50 BYTE),
    DAY5 VARCHAR2(50 BYTE),
    DAY6 VARCHAR2(50 BYTE),
    DAY7 VARCHAR2(50 BYTE),
    DAY8 VARCHAR2(50 BYTE),
    DAY9 VARCHAR2(50 BYTE),
    DAY10 VARCHAR2(50 BYTE),
    DAY11 VARCHAR2(50 BYTE),
    DAY12 VARCHAR2(50 BYTE),
    DAY13 VARCHAR2(50 BYTE),
    DAY14 VARCHAR2(50 BYTE),
    NOPTIND1 INTEGER DEFAULT 0,
    NOPTIND2 INTEGER DEFAULT 0,
    NOPTIND3 INTEGER DEFAULT 0,
    NOPTIND4 INTEGER DEFAULT 0,
    NOPTIND5 INTEGER DEFAULT 0,
    NOPTIND6 INTEGER DEFAULT 0,
    NOPTIND7 INTEGER DEFAULT 0,
    NOPTIND8 INTEGER DEFAULT 0,
    NOPTIND9 INTEGER DEFAULT 0,
    NOPTIND10 INTEGER DEFAULT 0,
    NOPTIND11 INTEGER DEFAULT 0,
    NOPTIND12 INTEGER DEFAULT 0,
    NOPTIND13 INTEGER DEFAULT 0,
    NOPTIND14 INTEGER DEFAULT 0
    CREATE TABLE PAYPERIODS
    PERIODID VARCHAR2(6 BYTE) NOT NULL,
    STARTPP DATE,
    ENDPP DATE
    Insert into SCHEDULES
    (SCHEDULEID, EMPID, PERIODID, AREAID, DAY1,
    DAY2, DAY3, DAY4, DAY5, DAY6,
    DAY7, DAY8, DAY9, DAY10, DAY11,
    DAY12, DAY13, DAY14, NOPTIND1, NOPTIND2,
    NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
    NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
    NOPTIND13, NOPTIND14)
    Values
    (3693744, 753738, '082013', 2167, 'X',
    'FRLO<1530>', 'FRLO<1530>', '1530', '1530', '1530',
    'X', 'X', '1530', '1530', 'FRLO',
    '1530', '1530', 'X', 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0);
    Insert into SCHEDULES
    (SCHEDULEID, EMPID, PERIODID, AREAID, DAY1,
    DAY2, DAY3, DAY4, DAY5, DAY6,
    DAY7, DAY8, DAY9, DAY10, DAY11,
    DAY12, DAY13, DAY14, NOPTIND1, NOPTIND2,
    NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
    NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
    NOPTIND13, NOPTIND14)
    Values
    (3693745, 753740, '082013', 2167, 'X',
    'FRLO<1530>', 'FRLO<1530>', '1530', 'FRLO', '1530',
    'X', 'X', '1530', '1530', '1530',
    '1530', '1530', 'X', 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0);
    Insert into SCHEDULES
    (SCHEDULEID, EMPID, PERIODID, AREAID, DAY1,
    DAY2, DAY3, DAY4, DAY5, DAY6,
    DAY7, DAY8, DAY9, DAY10, DAY11,
    DAY12, DAY13, DAY14, NOPTIND1, NOPTIND2,
    NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
    NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
    NOPTIND13, NOPTIND14)
    Values
    (3693746, 753748, '082013', 2167, 'X',
    'FRLO<1530>', '1530', '1530', '1530', '1530',
    'X', 'X', 'FRLO<1530>', '1530', 'FRLO',
    '1530', '1530', 'X', 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0);
    COMMIT;
    Insert into PAYPERIODS
    (PERIODID, STARTPP)
    Values
    ('082013', TO_DATE('03/24/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;

    Do you have the opportunity to change the data model to have one day per row ? It would make this easier to get this result without the need for a 14-way CASE or UNION.
    If not...
    The case statement will return as soon as it matches one of the conditions. Since you want a match when any column in the row starts with FRLO you can use a UNION ALL treating each column as a separate result. There may be more efficient ways to do this, but here is one way:
    Select S.Empid,       Pp.Startpp Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day1, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+1 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day2, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+2 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day3, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+3 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day4, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+4 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day5, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+5 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day6, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+6 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day7, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+7 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day8, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+8 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day9, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+9 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day10, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+10 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day11, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+11 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day12, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+12 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day13, 0, 4)) = 'FRLO'
    Union All 
    Select S.Empid,       Pp.Startpp+13 Startdate,       Null Starttime,       Null Endtime,       8 Hours,       0 Minutes
      From Schedules S       Join  Payperiods Pp On Pp.Periodid = S.Periodid
      Where Upper (Substr (S.Day14, 0, 4)) = 'FRLO'

  • Popup Key LOV, NULL and "Invalid numeric value undefined for column"

    Hello.
    I've created an item based on database column of NUMBER type and set the following properties:
    Display As = Popup Key LOV (Displays description, returns key value)
    List of values definition=select 'display_value' d, 1 r from dual
    Null display value=%
    Null return value=
    Display Null=Yes
    When I select "%" in the LOV and try to apply changes to database I get error:
    ORA-20001: Error in DML: p_rowid=1781, p_alt_rowid=N1, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value undefined for column N2
    Error Unable to process row of table TTT.
    If I set Display As = Select List, all works fine. But I need Popup Key LOV.
    Could anybody help me?
    I use Application Express 2.2.1.00.04

    Hi all,
    I did my homework and solved this issue. First I would like to thank Patrick Wolf for the invaluable help he gives out on thread Re: Null value handling in LOVs The code presented here is just a minor edit to his code, but an essential one when dealing with Popup Key LOV items.
    Here's what I did:
    1. Create an Application Process.
    Name: RemoveNulls
    Sequence: 0
    Point: On Submit: After Page Submission - Before Computations and Validations
    Process Text:
    BEGIN
        FOR rItem IN
          ( SELECT ITEM_NAME
              FROM APEX_APPLICATION_PAGE_ITEMS
             WHERE APPLICATION_ID   = TO_NUMBER(:APP_ID)
               AND PAGE_ID          IN (TO_NUMBER(:APP_PAGE_ID), 0)
               AND LOV_DISPLAY_NULL = 'Yes'
               AND LOV_DEFINITION   IS NOT NULL
               AND LOV_NULL_VALUE   IS NULL
        LOOP
            IF (V(rItem.ITEM_NAME) = '%null' || '%' OR V(rItem.ITEM_NAME) = 'undefined')
            THEN
                Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
            END IF;
        END LOOP;
    END;Error Message: #SQLERRM#Condition: None
    2. You should be able to submit a Popup Key LOV with a NULL value now.
    Once again, THANKS, Patrick! You rock! I'm seriously thinking of trying ApexLib now :)
    Georger

  • How to wrap text for column level field

    Hi,
    In iSourcing module. I have requirement for RFQ response page. I have to wrapt text of table level column.
    Screen have total 6 columns. First column heading is Line. This column displays item description. Length of Item description in VO is 240 characters.
    Presently entire 240 characters are displayed in one line only. Because of this user has to scroll towards the right to see remaining columns.
    Requirement is to wrap this first column contents so that all columns will get visible without scrolling.
    How do I set this wrap functionality on this column through Controller?
    I tried by following ways, but no luck,
    1. In processRequest method
    OAFlowLayoutBean ls_line = (OAFlowLayoutBean)oatablebean.findChildRecursive("Line");
    if(ls_line != null)
    ls_line.setWrapEnabled(true);
    In personalize options of “Line” field there is no option for “No Wrap” property.
    How can I achieve this column wrap functionality?
    Kindly help,
    Thanks in advance.
    Mandar

    Hi Ajay,
    This Flow Layout contains following items,
    1. DocLineNumber(messageStyleText)
    2. ItemDescription(messageStyleText)
    Requirement is to wrap ItemDescription.
    So i tried following code, but still no luck,
    OATableBean oatablebean = (OATableBean)oawebbean.findChildRecursive("BidItemPricesTableVO");
    OAMessageStyledTextBean ls_item_description = (OAMessageStyledTextBean)oatablebean.findChildRecursive("ItemDescription");
    if(ls_item_description != null)
    ls_item_description.setWrapEnabled(true);
    XML file name: ponResponsePG.xml
    File Location: $APPL_TOP/pon/12.0.0/mds/response/creation/webui/ponResponsePG.xml
    I am not able to post ponResponsePG.xml file here(Your message exceeds the maximum length of 30000 characters.
    ), can i have your email id? i will email this file to.
    Thanks and Regards,
    Mandar

  • Return data from all columns apart from a certain data type.

    Bit stuck on something, hope somebody here can help:
    I want to do a 'select * from ' a table, to return all columns except ones of a certain datatype. ie. I want to return data from all columns, excluding columns of datatype 'SDO_GEOMETRY'.
    This gives me the list of columns:
    SELECT COLUMN_NAME
    FROM   USER_TAB_COLUMNS
    WHERE TABLE_NAME = 'ORDER_ITEM'
    AND   DATA_TYPE <> 'SDO_GEOMETRY'; But I can't seem to take it any further...
    Now if I knew the columns beforehand, then of course I could just list them, excluding the geometry column, but this is to be used for a plug-in for MS Word, where a user can pick database columns to dynamically fill a report from - but I don't want the geometry columns as these can't be handled in this way.

    Hi Reggie,
    > connects to the database and presents a list of tables
    My guess is that this macro is written so it selects from all_tab_cols.
    Change that plugin and let it select from a view like the one above. That way, the users won't be able to see/pick anything that you are not able/willing to present for them.
    Edit:
    You could even tease your users, and let them see the columns, but not being able to pick them.
    create or replace view available_tab_columns
    as
       select decode(pickable.data_type, null, 0, 1) pickable
             ,atc.* -- narrow down yourself
         from all_tab_cols atc  -- or maybe user_tab_cols
             ,(select 'CHAR' data_type from dual union all
               select 'DATE' from dual union all
            select 'NUMBER' from dual
               -- complete positive list, yourself
              ) pickable
        where atc.data_type = pickable.data_type(+);Regards
    Peter
    Message was edited by:
    Peter Gjelstrup

Maybe you are looking for