All column width

i want to knwo the total width of all the columns in a single table
e.g 1st column is char(5) data_length column in user_tab_columns will show 5 byets
2nd column is varchar(5) data_length column in user_tab_columns will show 5 byets
3rd column is number(3) data_length column in user_tab_columns will show 22 byets
4th column is date data_length column in user_tab_columns will show 7 byets
means total width of all 4 columns is 5+5+22+7=39 byte but i want total in characters
so for now i'll elimanate date columns and will count total no of character in two group 1st is char and varchar from data_length column and 2nd is for number count from data_precision column
so the query is like this
select table_name,sum(data_length) as length from user_tab_columns where data_type IN ('CHAR','VARCHAR2') GROUP BY TABLE_NAME
union
select table_name,sum(data_precision) as length from user_tab_columns where data_type='NUMBER' group by table_name
this will give
TABL LENGTH
EXM 3
EXM 10
how do i get total of this 10+3 in sql query

Use DECODE.
SELECT   table_name,
         SUM (DECODE (data_type,
                      'CHAR', data_length,
                      'VARCHAR2', data_length,
                      'NUMBER', data_precision
             ) AS LENGTH
    FROM user_tab_columns
   WHERE data_type IN ('CHAR', 'VARCHAR2', 'NUMBER')
GROUP BY table_nameBut these queries may not give you the correct result. DATA_PRECISION is not always filled for NUMBER columns. For example if you have a NUMBER column added without a precision and scale it is shown as below in user_tab_columns.
SQL> create table t(col1 number);
Table created.
SQL> select column_name,data_type,data_length,data_precision
  2  from user_tab_columns
  3  where table_name='T'
  4  ;
COLUMN_NAME                    DATA_TYPE  DATA_LENGTH DATA_PRECISION
COL1                           NUMBER              22Message was edited by:
Yas
Message was edited by:
Yas

Similar Messages

  • Column width in output table cannot be changed

    Hi All,
    I have a visual composer model with an input form used to display variables to call a BW query. The query result is displayed in an output table.
    Multiple fields are displayed in the output table.
    On the layout tab of the visual composer model, I have changed the column width of the different output fields.
    After initial execution, the column widths of the different columns correspond to the settings in the layout tab. When I submit the query, example after entering the selection variables in the input screen and pressing submit, all columns widths change to 1 width. All columns now have the same width.
    We installed the latest VC version and hotpackages but this does not help.
    How can I change the column width of an output table?
    Best Regards,
    Filip

    Hi All,
    this column problem I know really good and there is a solution:
    Click on the Output-Port of your Query and then click on Configure. You will see on the right side the property "Dynamic Port". Uncheck that and you will see that the column width is like in the layout tab.
    This is only in Queries. In Function Modules you dont have to do this.
    Best Regards,
    Murat Yurtoglu

  • In Sales Order changing the column width to see all item desciption?

    When in the sales order screen .
    Expand the column width of say the item description.
    How do I save the column width for all the sales documents  for the field item description in sales order ?

    Hi,
    The column width of the Document will be defaulted to the same size at which the user has saved the last document.
    So, if a user has saved the Sales Order with a big column width for the 'Item Description' then after saving and re-entering into the Sales Order, the user can see the same column width for all the Sales Order's.
    I hope the above helps.
    Cheers~
    Jitin Chawla

  • Dynamically setting column width doesn't work all the time

    I wanted to dynamically set the width of a column in a JTable to be half of the width of a another column. This should happen whenever the frame is resized. But somehow I need to tell this twice to Java. If I don't then sometimes the column width isn't set new.
    Is this a Java bug or what?
    public void componentResized(ComponentEvent ce)
         try
              ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMaxWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
              ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMinWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
              // Again, or it won't work:
              ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMaxWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
              ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMinWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
         catch(SQLException e)
    }

    Is it possible that your call to
    ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMinWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
    is altering the response created by
    ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMaxWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
    ? Have you tried calling them once but in the other order? Or just calling the "setMaxWidth" call twice and leaving out the second "setMinWidth"?
    Good luck... :)

  • Web Application Designer: Column width on analysis_item with BW 7.0

    Hi,
    I'm new to SAP world and I have found a problem I'm not able to solve. I'm working with the Web Application Designer and I want to modify the cell properties (such as cell width) for aligning different queries. In fact, my question are:
    <b>
    1. Is it possible to hard-code/specify column widths of the analysis_item?
    2. The property width of the analysis_item doesn't work, does it?
    </b>
    Thanks for your time and efforts.
    Message was edited by:
            Daniel Rubio

    Hi,
    I have just discovered the capability of modifying columns widths with css properties.
    So if I add to the head section of the html:
    div.prueba2 .urSTTDBdr1
    div.prueba2 .urSTTDBdr
    div.prueba2 .urSTTDBdr2
    And later I put the AnalysisItem between a div class="prueba2" and /div, the columns widths are changed.
    Do you know where can I find all the style properties (such as urSTTDBdr1) and its functions?
    Thanks

  • How to resize column width in report?

    hi all,
    i read somewhere here that in order to resize column width in a report, you need to go to report attributes, then edit the column you wish to resize and then go to the CSS Style and place something like "width=600px". while this works very well in Internet Explorer, it somehow has no effect in Firefox 3.0. is there a way to make it work both browsers?
    thanks
    allen

    Hi,
    Sorry, I misunderstood. There are several methods you could use:
    1 - Use the span tags around the data itself - this would require adding the tags into the sql statement itself
    2 - Use javascript to set the column widths by adding a style to the TD tags for each cell
    3 - Create a new Report Template and use COL tags immediately after the TABLE tag in the Before Rows section to specify the widths of all columns
    Option 3 may be the easiest?
    Andy

  • How to controll column width in report ?

    Dear All,
    i have created Classic Report but here Column width is too large.
    i want to controll column width in report .
    How can i do this..
    Thanks

    Hi Vedant,
    There are two possibilities in your case.
    1.width of your column heading is too large.
    include break in your column heading
    for ex .. column heading is employee department number then write it as *[Employee(br)Department(br)Number]* // replace ( with < and ) with > in br
    2) Value is too large
    Go to Report Attributes->edit your column->column formatting->css style
    In CSS style put this display:block;width:100px;white-space:wrap
    Hope this will helps you,
    Thanks,
    Jitendra

  • How can I modify column width in a spreadsheet report without using an Excel template

    I currently use the LabVIEW Report Generation toolkit in LabVIEW 2011SP1 to create simple spreadsheet reports that I can build/print without having Microsoft Office products installed.  I really like being able to do this, and it allows me to generate nice on-demand data reports - I'm also not tied to having Office installed on the system I'm using, so this works on just about any test fixture I can install the software on.  
    I recently have a requirement that I must have variable-length columns in my report.  I currently use the VI "Append Text Table to Report" in order to create a text table, but the column width requirement is that all columns must be equal width UNLESS I use an Excel Template file to define my column widths.  
    My questions are:
    Is it possible to create a text table and define per-column widths without using an Excel Template?  If so, how?  My report mainly has a lot of small numerical values for the columns, but some columns contain system names or status messages - I really hate the longer text blocks wrapping and taking up so much real-estate when if I could control the column widths I can get all my data on a single line.
    I'll admit I haven't tried this myself yet, but if I use an Excel Template will that require me to have Excel installed on the PC in order to print/generate reports?
    Is there a recommended way (with an example) of generating a text table in a report with or without using the "Append Text Table to Report" VI that allows me to have custom column widths that doesn't require me to manually build a custom print page?  If I do have to create a custom print page, what would be the most straightforward approach?
    Thanks!
    -Danny

    Sure, I'll provide a pared down example that demonstrates my use-case:
    I have a control to the VI that takes in a 2D array of strings representing the data I want printed in a table.  I am generating a standard report, adding a table to the report, and printing it.  The first VI is "New Report.vi", the second VI is "Append Table to Report.vi", and the third is "Print Report.vi", all found standard in the Report Generation palette.
    Note that the "Append Table to Report.vi" has an input parameter "Column Width" with a default value of (1).  This input parameter is a single input parameter, which defines the column widths of ALL the columns in my table - hence, with the VI the way it is, all my columns will be 1 inch wide.  
    I find myself needing to be able to define per-column widths, not just a single global column width parameter.  
    The only way I have found to do this is by using an Excel template file.  The "New Report.vi" takes in a "template" parameter, and if used, the report generation toolkit can be set to ignore the "Column Width" input parameter on the "Append Table to Report.vi" by setting the width value to -1.  Instead it will launch Excel, open the template file provided, build the table using the template, will close Excel, and will attach the generated table to the report.  However, I have a strict requirement that Microsoft Office NOT be required to be installed on the computer.  
    So, without using Excel, is there a way to generate a table in a report and define the width of each column individually?
    -Danny

  • Is it possible to resize page column widths at runtime (by the user)?

    hi all,
    i have cretaed a page using the 2-columns narrow/wide layout.  this layout is perfect for what i want to do.
    however, the users have complained that they would like to be able to resize the columns, just like they are able to do with the Detailed Navigation column (using the small "<" and ">" arrows).
    is it posssible to add this functionality to my custom pages so that can also resize the columns?
    i searched for options in the properties, but didn't find anything.
    thanks,
    mm

    This was a great place for me to start
    Thank you
    I took profdant139's suggestions a bit further as my real goal was to have the "Document column" narrower. The goal to be able to see all the other document info that was usually hidden way out to the right
    To achieve my results I right clicked in the upper bar with the column names and chose from the drop down box "comments" column (as suggested). I then dragged it to the far right. This pushed all the other columns over.
    In the end of the day I ended up adding "Size" and "Date modified" columns as well to get my desired results.
    Remember one can move different columns around to be in the order you need by clicking on the column to get it active and then left click and drag it to where you want
    Another great thing is that by default (Using Mavericks) the date modified, opened,created columns have date and time. One can shrink them down to xx/xx/xx format by manually adjusting the column width like one does in Excel - click on column separator up top and drag
    Once all that is done, at least on my box, I closed it out and opened up a new finder window and everything was as I wanted.
    Thank you for the help  from the above helper to get me here

  • Interactive Report Column Width adjustable?

    I am using the interactive reports in 3.1.2 and love them. That said, I have a question/problem. I have a column in my report that is essentially comments. It often contains hundreds of bytes of text per row of data. When I use the interactive report I find no where that I can define a default column width or number of report rows to display. So, when I run the report, the column with the comments defaults to a column width of about 25 characters and this causes it to display many html rows for this report row and makes the report very ugly.
    Does anyone know if there is a way to redefine a column in an interactive report to prevent this?

    Scott,
    Using FOP.
    Standard reports PDF can resize columns.
    Interactive report does not. Additionally, the page size does not work the same as the regular reports. Moving between landscape and portrait changes the size of the height and width.
    I assume there are several problems.
    1. The report does not resize horizontally. I will have to create a second report to see if I can duplicate the issue.
    2. The Print page of the report region does not have the same fields as the regular reports. I am not sure why or how to overcome the lack of being able to resize columns, etc.
    3. The functionality on the page does not seem to all work. At least not the same way as the regular reports. Changing paper size and orientation are two examples I have verified.
    4. Can't select a template. How can a different XSL-FO template be used?
    I am going to try and push it to Word.
    Sam
    Edited by: slavanaway on Mar 26, 2009 1:13 PM

  • How to optimize the column width in Table Control

    Hi all,
          When I am displaying fields in Table Control, the columns are displayed in full length, and I am unable to see all the fields at once.
    So as in grid , where we optimize the column width using layout, do we had any property for TC to do so.
    thanks for your help.
    Points would be awarded .
    Regards,
    Anil .

    Hi,
    In Se51, you can do this one, ust open your table control and resize the TC, there is no direct option to do this for entire TC, you need to do this field by field, and arrage the TC to adjust in a Single screen. In the field parameters, you have the field lenghts, there you can minimize the length of a field
    Regards
    Sudheer

  • How to bring all columns in a single/first page in report painter

    Hi Experts,
    There are 9 columns in a report painter which includes 1 lead column.
    7 columns comes in a first page including lead column and rest 2 columns goes to second page. This report is copied from another report where all columns comes in a first page only. if the original report comes in one page then why not the new report.
    Please suggest how to bring all columns in a single/first page in the new report.
    Please revert if I'm confused anywhere.
    Thanks in advance
    Arabinda

    Hi Rajneesh,
    Thanx for the quick reply. When I change the column width to 10 it comes in one page. But the requirement is to keep the column width to at least 12 or 14 and moreever the original report from where this report is copied having the same no of columns and the column width for original report is 14 and it comes in one page only.
    Do I need to do something more to achieve this. My question is how the original reports data comes in one page where as the current report having issue with same number of columns.
    Pls suggest.
    Thanx,
    Arabinda

  • Column width in finder LIST view

    I am using Yosemite.  This issue has been driving me mad for years and try as I may I cannot find the solution.
    How do you set a default column width in Finder LIST view for all folders?  Whatever I do (for example VIEW OPTIONS, USE AS DEFAULTS) does not work.
    Can anybody help? I would use third party plugins if I could find something that controls this.  Please note: I am using LIST view NOT column view.
    Many thanks

    Like Jim, I also generally use Icon view for folders containing images, and have the View Option to show item info selected. Column view will also show image dimensions (both of these work, provided the folder has been indexed by Spotlight).
    If you want to see the dimensions, but also want to view the folder contents in List view, the best you can do is bring up the Inspector (Command-Option-i), expand the More Info section, then move down the list using the arrow key. The Inspector pane's contents change with each new selected item, and the More Info section includes the dimensions.
    Francine
    Francine
    Schwieder

  • How to increase a column width in numbers

    Hello,
    Is there a way to increase the column width of a numbers table by using a short cut.
    In a few words is there any shortcut to increase or decrease the size of cells and columns?
    Something like command+?
    Regards,
    Jonathan M.

    No key commands are available.  You can select the table then use the "Table Formatter":
    These controls will apply to the items selected.  If you have one column highlighted then you can change the width of that one column.  If you select all columns then this control will apply to the selected columns.
    you can also hover the cursor over the dividers between columns (the lines in the header... the lines between, for instance, the "A" and  the "B").  The cursor will change to a vertical bar with a horizontal line with left right arrows, then click and drag as needed.  Similar for rows.

  • Change the column width on the fly

    Dear all,
    I have a problem, i have a matrix report, the row is "the project name" and the column is "the items" using within each project, and the problem is the items are variable from time to time the report run for each project, so its exceeds the paper width.
    And the question is, is there any way to change the width of the column on the fly, i mean dynamiclly change the column width each time the report is called to make all items fit the paper width.
    Thank u

    i don't think that we can change the layout of the column in reports
    The simple solution for that problem is that u have to
    fix the horizontal and vertical layout of the text item
    better is to post this problem at reports forum
    Najeeb

Maybe you are looking for

  • Multiple email accounts got synced on accident  when I synced with .Mac

    Yesterday when I did the sync with my .Mac account it gave me a warning that it was going to update alot of emails... thinking nothing of it I said yes. What I did not realize it that it synced all of my roommates email accounts and contacts that he

  • Loading external movies in specific frames

    Here's what I'd like to have my project do: By clicking on a button in frame 5 I'd like to load a movie into an empty movie clip in frame 20. I'v ewritten the script to create the empty movie clip and also load the movie, but the movie loads into all

  • Passing value to RFC

    Hi Friends I have a requirement where I have to pass few values from Adapter Module to RFC which will update the database table. Example: I have to pass filename and filesize to RFC which will update the table X Could someone provide me the snippet o

  • Conditional disable no longer works

       We have a large application that calls modules dynamically.  It has been working in LV 8.2.  We compile the main program and use "Source Distributions" to distribute modules for individual installations.  Thus these modules are LV source code in d

  • Trying to download updates Please help

    I have been trying to update some apps but the I'd is incorrect, I have checked the default I'd and that is right. Any ideas how to change the one for the apps. Everything else has the right I'd.