Servlet to view columns

I'm creating a servlet to display data from the database. The user must be able to choose the columns they want and also the fields that they want to be included in the results. This should be in a form of html select option, meaning that I'm thinking of giving them two options, one they chose the records they want to see and two, together with the colums they want to view.
Thank You

you need to do it by following steps.
1. Create an User interface i.e generate a html that allows the user to select at the avalable columns by the use of a checkboxes.
( If the req. is fixed you can use a html instead of getting dynamic info by the use of ResultSetMetaData to display all columns use <getColumnName()> from the table to user as check boxes).
2. Handle what ever is being checked and prepare an SQL that gets the values for Corresponding checked fields from DB.
hope this will give you an idea.
Coke

Similar Messages

  • Reg: View column datatype

    Hi Team,
    While creating the views, column automatically converted into varchar2(81) data type from number datatype.
    but stage1 table has legacy_trx_number is number data type and statg2 table has header_num is number data type.
    Just i added the highlighted part in the view. So automatiicaly converted number to varchar2 datatype. How to keep data type remain the same as source stage table datatype even though those columns used in the view.
    CREATE OR REPLACE VIEW test_view  AS
        SELECT h1.legacy_trx_number
          ||'.'
          ||h2.header_num legacy_trx_number,
          h1.legacy_trx_date,
          h1.ledger_id,
          h1.legal_entity_id,
          h1.header_record_identifier,
          h2.header_num,
          h2.gl_date,
          h2.header_value_full,
          h2.header_value
        FROM stage1 H1,
          stage2 H2
      WHERE h1.header_record_identifier = h2.header_record_identifier;
    Please help give me suggestion on this.
    Thanks in advance.

    You can do it like this!
    Example:-
    SQL> ed
    Wrote file afiedt.buf
      1  create view v_num_test
      2  as
      3* select to_number(5478||'.'||87489) result from dual
    SQL> /
    View created.
    SQL> select * from v_num_test;
        RESULT
    5478.87489
    SQL> desc v_num_test
    Name                                      Null?    Type
    RESULT                                             NUMBER

  • SharePoint 2010 : How to display ALL Version History of a list item's multiline text box in a same list as a list view column?

    In SharePoint 2010 , I have version history enabled multiple text box 'issue details'.  Users mainly uses Data Sheet view and it does not show all version history of that multiple line text box, is there anyway we can display list view column in
    data sheet view to display all version history?
    2) If we can not display in datasheet view, in standard view, it should display all version history instead of just a link  to -view all entries'
    I have found one article here and it posts to use below line of code in sharepoint desinger
    <SharePoint:AppendOnlyHistory runat="server" ItemId="{$thisNode/@ID}" FieldName="Issue_x0020_Details" ControlMode="Display"></SharePoint:AppendOnlyHistory>
    WHen I use this line of code , it displays multiple line of same version history instead of each, please help.

    Hi
    Greetings. Hope it helps 
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/d1be5434-7dc9-4941-bf1d-8c12d7e6a155/display-version-history-in-list-view-column?forum=sharepointcustomizationlegacy
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • In user_tab_cols the data_type is 'undefined' for view columns

    Can anyone please confirm if this is the correct behaviour ?
    select table_name, column_name, data_type from user_tab_cols
    where table_name = 'AR_RCT_CUST_H_V'
    AR_RCT_CUST_H_V     RCT_CUST_ACCOUNT_NUMBER     UNDEFINED     
    AR_RCT_CUST_H_V     RCT_CUST_TYPE     UNDEFINED     
    AR_RCT_CUST_H_V     RCT_CUST_ACCOUNT_ID     UNDEFINED
    This view ( AR_RCT_CUST_H_V ) is created using force view command.
    Also which table can I query to see the correct datatype for the view columns ?
    database version : 11.1.0.6.0
    Thanks,
    Debraj.

    NVL (data_precision, 0) PRECISION
    nvl function replaces all nulls with what ever your given value.
    Thanks,
    surya

  • View Column info not displaying in Columns Tab

    Running XP SP2 and SQL Developer 1.5.1 5440
    When looking at views that are using tables from another schema. I don't see any of the columns information. I have DBA role
    In rel 1.1.2.25 2579 I see them just fine. (Both loaded on machine right now)
    Is this a bug or do I have a setting problem?

    Barry,
    As a "disclaimer", the points below are based on my usage of SQL Developer and things that bug me about how it works or doesn't work - I know that there are more important things to fix than a number of these.
    On to the basics ... and the most basic of the basics for a tool like SQL Developer:
    1) Problems with data dictionary queries in navigator or object tabs:
    - Triggers not listed in Table tab if trigger owned by different schema to table owner
    - Index columns not listed in Table tab if index owned by different schema to table owner
    - View columns not listed in View tab if view owned by different schema to current user
    - Dependencies not listed in Table/View tab if other object owned by different schema to object owner
    - Performance of Table Node (outer join added in 1.5.1)
    - there are a lot of other posts about the supplied data dictionary queries not producing the right results and I often find that I am querying the data dictionary directly in a SQL Worksheet for information that should be correct in the navigator/object tabs
    Basic things that I expect to work in a tool like SQL Developer (or to work given that they have been included):
    1) Popup Describe problems
    - schema name is case sensitive, so doesn't find owner.object
    - synonym overrides schema name (OWNER.OBJECT will describe local OBJECT synonym instead of OWNER's object)
    - position based object name selection includes punctuation
    2) Bind variables that work properly in PL/SQL (both Execute Statement and Run Script)
    3) Package decomposition in object navigator doesn't report variables or constants of custom types and lists object.column%type constants as "constant"
    4) Exporting query results re-executes query to display Export dialog - this presents as SQL Developer freezing after selecting the Export menu option for queries that take a long time for first record to appear
    I would use SQL Developer more (or more of SQL Developer) if:
    1) More integrated file based development - I still do the bulk of my object creation (largely PL/SQL and views) editing in Wordpad and running via SQL*Plus largely because I get better error reporting.
    - display the compile message tab when using the compile button for a file
    - show errors doesn't work for views
    2) Running Reports hang SQL Developer - I still have my SQL scripts for my common queries, which I can run through SQL Worksheet in a much friendlier fashion (I can cancel them and they don't hang SQL Dev) than I can run reports
    Problems that detract from the "polish" of SQL Developer, but don't really have a big impact on usage but discourage me from trying to "convert" non-techie TOAD using colleagues:
    1) Multiple TNSNAMES files read - generates multiple entries
    2) Export of long string literals causes ORA-972 error
    3) "Statement Processed" feedback is extremely sensitive to spaces ("create Statement Processed" where two spaces between the create and view keywords) and assumes simple statements ("create unique Statement Processed" or "create or replace force Statement Processed" as examples)
    I think that makes 10 basics to fix (although some as just issues that make the tool look unpolished), however, it does seem as though testing in the following areas could be significantly better:
    1) Regression testing - a number of bugs seem to crop up again after being fixed in earlier versions
    2) Navigator/object tab queries - especially with multi-schema applications (ie Oracle eBusiness Suite) and just generally objects owned by other schemas
    3) Performance with large DBs in terms of object count (ie Oracle eBusiness Suite)
    As a final note, it is my impression that SQL Developer development has been unbalanced in focusing too much on including new functionality (which is good) and not enough on getting existing functionality right (which is better).
    I hope this helps (and wasn't too long) ...
    theFurryOne

  • Calling a Breadcrumb image inside a Table view column

    Hi
    I want a sample code to call any bread crumb related image inside a table view column.
    Please help with a code snippet.

    I mean that, inside the iterator class of the tableView, write this code in the RENDER_CELL_START method.
    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
      CASE p_column_key.
        WHEN 'ICON'.
    p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY(       id        = p_cell_id                              src      = '@3J@'  ).
        ENDCASE.
    Inside the method, GET_COLUMN_DEFINITIONS you need to append a column for icon, see the code below:
    APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
        <def>-COLUMNNAME = 'ICON'.
        <def>-TITLE      = 'Display Icon'.
    For more info you can refer to weblog on HTMLB TableView Iterator by Brian.
    Hope I am clear.
    Regards,
    Ravikiran.C

  • Need to know base table and base column name for Oracle view columns

    I am trying to load metadata for some views and that requires me to know what the final table and column name would be corresponding to the view column.
    For example, if I have a view x_v that is select a,b from x_v2; and x_v2 is a view that is select a,b,c from x;
    I need to get the following information.
    View View Col Base Table Base Col
    X_V A X A
    X_V B X B
    and so on.
    Is it possible to get this programmatically using any SYS schema tables or Dependency tables?
    I tried an indirect approach wherein I lock tables using LOCK TABLE or FOR UPDATE OF. But I'm not too sure if I can go down to the level of individual view columns.
    Can you help me with this?

    Thanks. I was looking at some indirect approaches.
    I came up with this script that does it faster than dependencies but thats just for tables and not column mapping.
    declare
    cursor bt(cp_sid number) is
    select u.name uname, o.name oname
    from sys.obj$ o, sys.user$ u
    where o.obj# in (select id1
    from v$lock
    where sid=cp_sid)
    and u.user# =o.owner#;
    cursor c_sid is
    select sid
    from v$session
    where audsid =userenv('sessionid');
    l_sid number;
    l_view varchar2(100):= 'PER_PEOPLE_V';
    l_schema varchar2(10):= 'APPS';
    begin
    open c_sid;
    fetch c_sid into l_sid;
    close c_sid;
    dbms_output.put_line('SID: '||l_sid);
    execute immediate 'lock table '||l_schema||'.'||l_view||' in row share mode nowait';
    for i in bt(l_sid) loop
    dbms_output.put_line(i.uname||'.'||i.oname);
    execute immediate 'alter table '||i.uname||'.'||i.oname||' disable table lock';
    execute immediate 'alter table '||i.uname||'.'||i.oname||' enable table lock';
    end loop;
    end;
    It basically uses locks on views to verify locks on the base tables.
    Just wondering, can we use FOR UPDATE OF statements to get to the columns?

  • Where is the refresh tab under the view column that use to be there?

    Up until FF 4.0 was installed, I use to be able to click on the refresh tab in the view column and refresh the current page. Not anymore. What happened to it and how to I access that feature?

    I finally found the button. Nevermind.

  • Mavericks Will Not Retain Finder List-View Column Resizing

    I've noticed this to occur at the root level of my hard disk in Finder.  A visual will work best:
    The "User Guides and Information" folder is truncated at the root level of my Hard Disk.  I will then manually resize the column:
    When I close out this window via the red close circle, and re-open, Finder will not remember my custom column view.  It will revert back to the previously truncated state.
    Oddly enough, I've found Finder to correctly preserve custom list view columns when you drill down a level (such as my custom column views inside of my Applications folder, for example).

    I managed to find a solution that sorts the problem out for the time being till maybe Apple rectifies it.  It is to open Finder and have it expanded to fit the screen.  I don't know the proper names of things but in the heading that says Name etc, right click that so that you get a list of other things that can go in that heading, like Date Modified, Date Created etc.
    Tick one or two that you don't need, like Tags for example.  The purpose of those extra headings are to fill the column space at the right hand side of Finder so that it keeps the columns that you DO want on the left hand side kept in the same place.  Once you've got all the headings and columns, move the width of the ones you want to the size that you want, making sure that the ones that you don't want, like Tags, on the right hand side totally fills up the rest of the column space.
    This makes the full page Finder column space full up so that the columns you want don't end up shrinking every time you open Finder.  Return Finder to the size that you usually use, adjust the width of your wanted columns to the size that you want and it should stay in place because the rest of the space in Finder is filled with the unwanted columns you chose, but which are hidden from view on the far right hand side of Finder, if you've got Finder smaller than the full screen, that is.
    Ever since I did this with my columns (in List view) my columns remain where I have set them.  (I hope you understand all that OK).

  • SEM-CPM Analysis view columns

    Hello, I know this is a question on an old product but...
    In balancd scorecards, i have 2 scorecards that look like they have been set up in the same way however when I present them in analysis view the views are very different.
    One has al the information regarding trend, owner etc... the other just shows the hierarchy of strategy/perspective/objective/mesure
    where is the setting where I can decide what to show on the analysis view columns?  I have looked into scorecard specific design and there are no differences in the setup!
    please help..
    thanks

    I have the same problem, i wat to setup the columns that can be viewed (current, plan, target) for the analysis view of the scorecard, but i cannot find where to set up this.
    Could you please help me in order to set up the "Analysis view" in my scorecard.
    Regards,
    Thanks in advance
    Carlos España.

  • How to retrieve view column type?

    I know how to retrieve column names and comments from
    table all_col_comments.But I don't know retrieving view column type.If somebody know please help.

    ALL_TAB_COLUMNS
    ALL_TAB_COLUMNS describes the columns of the tables, views, and clusters accessible to the current user. To gather statistics for this view, use the SQL ANALYZE statement or the DBMS_STATS package.
    Related Views
    DBA_TAB_COLUMNS describes the columns of all tables, views, and clusters in the database.
    USER_TAB_COLUMNS describes the columns of the tables, views, and clusters owned by the current user. This view does not display the OWNER column.
    Column Datatype NULL Description
    OWNER
    VARCHAR2(30)
    NOT NULL
    Owner of the table, view, or cluster
    TABLE_NAME
    VARCHAR2(30)
    NOT NULL
    Name of the table, view, or cluster
    COLUMN_NAME
    VARCHAR2(30)
    NOT NULL
    Column name
    DATA_TYPE
    VARCHAR2(30)
    Datatype of the column
    DATA_TYPE_MOD
    VARCHAR2(3)
    Datatype modifier of the column
    DATA_TYPE_OWNER
    VARCHAR2(30)
    Owner of the datatype of the column
    DATA_LENGTH
    NUMBER
    NOT NULL
    Length of the column in bytes
    DATA_PRECISION
    NUMBER
    Decimal precision for NUMBER datatype; binary precision for FLOAT datatype, null for all other datatypes
    DATA_SCALE
    NUMBER
    Digits to right of decimal point in a number
    NULLABLE
    VARCHAR2(1)
    Specifies whether a column allows NULLs. Value is N if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY KEY.
    COLUMN_ID
    NUMBER
    NOT NULL
    Sequence number of the column as created
    DEFAULT_LENGTH
    NUMBER
    Length of default value for the column
    DATA_DEFAULT
    LONG
    Default value for the column
    NUM_DISTINCT
    NUMBER
    These columns remain for backward compatibility with Oracle7. This information is now in the TAB_COL_STATISTICS views. This view now picks up these values from HIST_HEAD$ rather than COL$.
    LOW_VALUE
    RAW(32)
    HIGH_VALUE
    RAW(32)
    DENSITY
    NUMBER
    NUM_NULLS
    NUMBER
    Number of nulls in the column
    NUM_BUCKETS
    NUMBER
    The number of buckets in histogram for the column
    Note: The number of buckets in a histogram is specified in the SIZE parameter of the SQL statement ANALYZE. However, Oracle does not create a histogram with more buckets than the number of rows in the sample. Also, if the sample contains any values that are very repetitious, Oracle creates the specified number of buckets, but the value indicated by this column may be smaller because of an internal compression algorithm.
    LAST_ANALYZED
    DATE
    The date on which this column was most recently analyzed
    SAMPLE_SIZE
    The sample size used in analyzing this column
    CHARACTER_SET_NAME
    VARCHAR2(44)
    The name of the character set: CHAR_CS or NCHAR_CS
    CHAR_COL_DECL_LENGTH
    NUMBER
    The length
    GLOBAL_STATS
    VARCHAR2(3)
    For partitioned tables, indicates whether column statistics were collected for the table as a whole (YES) or were estimated from statistics on underlying partitions and subpartitions (NO).
    USER_STATS
    VARCHAR2(3)
    Were the statistics entered directly by the user?
    AVG_COL_LEN
    NUMBER
    Average length of the column (in bytes)
    CHAR_LENGTH
    NUMBER
    Displays the length of the column in characters. This value only applies to the following datatypes:
    CHAR
    VARCHAR2
    NCHAR
    NVARCHAR
    CHAR_USED
    VARCHAR2(1)
    B | C. B indicates that the column uses BYTE length semantics. C indicates that the column uses CHAR length semantics. NULL indicates the datatype is not any of the following:
    CHAR
    VARCHAR2
    NCHAR
    NVARCHAR2
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch2143.htm#1302694
    Joel P�rez

  • "Views" column works only if excluding its posters

    "Views" column is a good idea, thanks,
    (and finally we would not need a "Read vs Unread" column if only the small blue dots were not SO small)
    but
    it would be nice if it showed the actual number of visits.
    As it is now, it mainly shows how many times the posters edit their questions and answers, and how many times they go check if they were awarded
    Why not set it to ignore its posters' views, and count only the views by people who have no post in it?
    Thanks for the hard work!
    Things are getting better now and I already like the new Discussions!
    Axl

    Testing again: Marking (back) the question as Unanswered.
    "You must enter a reason for marking your question as unanswered because it is currently marked as "answered."
    Sorry ~Bee, I'd rather leave it like that, than mark an Unanswered question as Answered.
    Edit:
    Of course this too adds a new post, as if it was a reply or additional useful info.
    So this has to be my Post #314/2760

  • Change Bridge Default List View Columns

    I only view specific image information and am continually moving the list view column headers around.
    Is there a way that you can set the default list view columns to display only what you need?

    Is there a way that you can set the default list view columns to display only what you need?
    You can create your own custom workspaces using the triangle next left to the search field top right Bridge window and choose new workspace.
    First you have to define your workspace by resizing or moving the panels to other locations (grab a panel tab and it will be surrounded by bleu lines, move to other location. A horizontal line means as a row in a column. A vertical line creates a column (max 3) and a surrounding line puts it in the same location as an extra tab.
    Use either menu view / list or use the default Metadata workspace that also shows list view.
    You can right click on the title of the column in list view and from the sub menu choose to insert or close certain columns. This is rather limited in options and the name column can't be altered at all (logically I would think…)
    Try playing around and when satisfied save it as new workspace and you can always revert to it by clicking on the workspace name and sometimes also needing to use the reset workspace button (workspaces are still far from perfect but in its current state also proved to be very useful).

  • Customizing List View Column Location

    Can anyone help me remember how I take off certain columns in List View such as Lens, Orientation etc?
    I am looking in the Customizing Aperture Workspace section of the Help and I can't seem to find this.
    TIA

    Sorry, was getting some _very_ important work done -- have a mega-big project going out the door -- here's the top link from a search of the User Manual for "List View Column":
    Working with Images in List View

  • Framework Hiearchy : View Columns

    Hi Experts,
    In the Hierarchy framework, i defined my columns order for a specific column group.
    One column keeps always the same order instead i've changed it . In fact , when debugging i find that there is a default order  stored .
    This is the statement :    * import i_user_columns     from database ltdx(rh)    id ltdxkey. *
                                                                                    My question : how to change this order? Where can I find this view columns or table/cluster?
    Thanks for your help.
    Edited by: kraiem adel on Oct 27, 2010 9:43 AM

    Personal effort

Maybe you are looking for

  • Sender Mail Adapter - html body mail

    Hello Everybody, I'm facing this strange problem: I receive an e-mail with an XML attachment with a sender mail adapter and I use the PayloadSwapBean to let the attachment be the real payload as explaned in this blog <a href="/people/michal.krawczyk2

  • Mailbox will not load in firefox 4

    The tiscali mailbox will not load within firefox 4. I am able to log into the mailbox but once logged in I cannot access the inbox or any other function apart from email composition. Attaching a file to an email also produces a 500 error within the u

  • How can I track a audiobook that i sent as a gift?

    I believe I sent audiobook as a gift to my sister in law but haven't gotten an email confirming the purchase.

  • Spry Tabbed Panels Width

    The width of the tabs at the top of the Spry Tabbed panels seems to be about 70% of the width of the panel. Adding additional tabs then wrap around to create a new row of tabs. How is it possible to extend the first row of tabs to be 100% of the widt

  • UIX Tree: "Expand All" Functionality

    Hello, I have a question about the Tree in UIX. We are using the Tree component in a UIX Page (JDeveloper 10.1.2). With the tree we also make use of the ClientStateTreeDataProxy class. It is possible to expand and collapse the tree, but I want to hav