Averaging figures in multiple columns.

Sorry. I know this may be something very simple, but I'm an old **** who is very technologically challenged.
I have figures in different columns that I want to average.
So far, I can't get it to work. The formulas I have tried all fail. This is an example:
=AVERAGEA((C2:C19)(G2:G31)+(K2:K32)+(O2:O31)(S2:S32))
The warning box says, "The range C2:C19 can't be used as a single value."
What am I doing wrong?

Should you be using a comma between columns instead of the plus sign?
=AVERAGEA((C2:C19),(G2:G31), etc...
Make sure you have the parenthesis correctly entered.
Regards,

Similar Messages

  • How to link Excel Chart with multiple columns dynamically?

    Hi all,
    I have one problem. I have an excel chart which has to read data from multiple columns for it's X-axis values (time stamps) and the same number of values for it's Y-axis from multiple columns. See figure attached.
    Now, you can do this by manually assigning values by holding control key to tell the chart that data from many columns is continued from the first column. i.e, a long data is distributed along may columns. This is done very easily manually.
    Now, how to do it at runtime through LabVIEW 8.0?
    Although, I have done it through labview when there where only two columns, A and B streching up to any length. But, now to save space we are dumping into many columns in the same page and want the chart plot that data as we dump it. 
    It is tough since I don't know how to assign SourceData of the chart through labview.
    I have attached chart's SourceData picture.
    Hope you all can solve my problem.
    The Y-axis values are: =(good!$B$30:$B$70,good!$D$30:$D$70,good!$F$30:$F$70,good!$H$30:$H$70,good!$B$71:$B$140,good!$D$71:$D$140,good!$F$71:$F$140,good!$H$71:$H$140,good!$B$141:$B$189)
    good is the name of the file.
    The X- axis values are: =(good!$A$30:$A$70,good!$C$30:$C$70,good!$E$30:$E$70,good!$G$30:$G$70,good!$A$71:$A$140,good!$C$71:$C$140,good!$E$71:$E$140,good!$G$71:$G$140,good!$A$141:$A$189)
    See the columns vary from A to F.
    I have still not got what I love.....
    Attachments:
    ExcelChart.JPG ‏113 KB
    SourceData.JPG ‏34 KB
    XY values.JPG ‏36 KB

    Ok i solved the excel chart problem. Here is the figure showing my victory! But offcourse with NI forum help.
    Message Edited by Halemani on 09-19-2008 06:33 AM
    I have still not got what I love.....
    Attachments:
    Chart_XValues_Values.JPG ‏36 KB

  • How do i print multiple columns on 1 page in numbers

    I think I am over thinking this but I have confused myself. I am using Numbers to create a spreadsheet of family names with their corresponding number. I would like to print multiple columns of names on one page to save paper but I can't figure how to do it. Will someone please help me???

    Hi BestMommy,
    Here is one way. Don't mess with your database. Create a new table for printing.
    Database with a Header Row (named Table 1 as an example) might look like this:
    Name
    1
    Name 1
    2
    Name 2
    3
    Name 3
    4
    Name 4
    5
    Name 5
    6
    Name 6
    7
    Name 7
    8
    Name 8
    9
    Name 9
    10
    Name 10
    11
    Name 11
    12
    Name 12
    13
    Name 13
    14
    Name 14
    15
    Name 15
    New table for printing:
    Name
    Name
    1
    Name 1
    8
    Name 8
    2
    Name 2
    9
    Name 9
    3
    Name 3
    10
    Name 10
    4
    Name 4
    11
    Name 11
    5
    Name 5
    12
    Name 12
    6
    Name 6
    13
    Name 13
    7
    Name 7
    14
    Name 14
    Formula in A2
    =Table 1::A2
    Formula in B2
    =Table 1::B2
    Formula in C2
    =Table 1::A9
    Formula in D2
    =Table 1::B9
    So it loops back from the bottom of a page to start a new column.
    I made this example small for the pics, but obviously you could have more rows and columns per page.
    Having created your table for printing, select it, Cut, add a new sheet and Paste. Print just that sheet.
    Have a look at 'More Like This' at the bottom of this page. Trying to format page to print table in two columns Jerry suggests using Pages instead of Numbers.
    Regards,
    Ian.
    Edit: Having created your table for printing, select it, Cut, add a new sheet and Paste. Print just that sheet. Ian.

  • How do I create multiple columns with bullets in pages

    I'm trying to figure out how to create multiple columns within a document in which I bullet information...

    At the point you wish to change to two columns, Insert > Columns and then in the Layout Inspector, select the number of columns. After the insertion point, you will also need to insert another Column Change to return the following paragraphs to single column.
    Then Select the text to be bulleted and in the Text Inspector > List tab select the type of bullets.
    Note: This creates two columns that flow together. This can be tricky if you add any text later.
    If you wish to ensure alignment, create a two column text table and remove the lines with the Graphic Inspector > Lines > No Lines option and insert your text in each column and apply the bullets as above.
    This will create a text box - you then need to ensure it moves with the text by electing "Object Moves With Text" in the Wrpa Inspector.
    Message was edited by: bwfromspring hill

  • How to get a distinct count of multiple columns

    I've done this before and I'll be darned why I can't recall this.
    Table with 3 columns with the primary key defined in column a.
    Row a b c
    num.
    1 020 how abc
    2 030 why def
    3 010 not ghi
    4 040 how abc
    5 050 yes def
    6 060 why def
    So what I want is a count of the unique values for columns b and c as if b and c were actually one field.
    So the result of the query would be:
    Count = 4 unique rows.
    Hopefully I'm making some sort of sense. It's a bit much to ask about the number of occurrences of each duplicate value, I'm sure just getting count of the unique rows of the non-indexed rows will be sufficient. Since the query is meant to be universal for multiple columns of numeric and alphanumeric data and can be expanded for multiple columns, I am simply trying to get a basic skeleton that works for an "on the fly" analysis.

    Thanks to all of you. I had the idea and just couldn't nail it down. You did it.
    All of you understood what I poorly communicated. My apologies for the lack of prep with a table, I was running patches on the system and couldn't dare interrupt it on my laptop and starting Oracle 11 while Micro$lop was patching all sorts of evil code. This is something I'm setting up on my own time so it's a work I'm going to try to be proud of. So there will be plenty of instrumentation and debugging code for timing.
    I'd thought of concatenating columns and was worried it wouldn't backport to older Oracle versions (work goes back to 8.1.7) with nulls and other goofy things like long raw fields or lob/clobs plus the other DBs that are at various sites. What I'm trying to do is improve on a crappy data analysis tool SAP provides to use with reporting unique columns. (Basis people could recognize this as DB05). I tried dragging out the SQL that their ABAP/4 language generates from an SQL trace but it was unusable and often dies on internal storage which on most sites is about 4GB per process. Needless to say, the program is wasteful and I'm trying to keep the work on the DB where it belongs and discourage cowboys from doing this in the DB on the fly and at the same time make it simpler for junior members to use while having a semblance of an audit trail.
    What I'm trying to do is work out a tool that checks all the crappy secondary indexes that were created by folks who seem to think in ways that are from an alien species not yet speculated about even with the strongest psychedelics. One of them actually decreases performance by a minimum factor of 5. It's not much when it's 5 seconds but when the response time averages about 3 hours beforehand, you can imagine what it was like afterward. In this particular case, the "logic" was that the index needed to be defined by the order of the fields of the select clause. Some myths never die. So it's not easy to work out which ones haven't been used in a long time, so it's down to finding which of the custom ones are actually bad in terms of selectivity. Some of these may have made a little bit of sense when the system was started up, now that some of these have millions of rows instead of a few thousand, thaw tend to expose the flaws in design.
    I'm also trying to make this work on multiple DBs such as DB2, MaxDB and (sob) SQL Squealer. The idea is to write this in ABAP code as a utility without the overhead of internal tables in ABAP as some of these tables are many millions of rows and I have to account for the size in memory. (ABAP field sizes in internal memory are generally much larger than the actual DB lengths. so every bit helps!) So I'm trying to create actual SQL on the fly and use it internally without going through the SAP DB interface which limits the type of SQL functions used and all the overhead. It's intended to grab a secondary index and if there are more than 2 fields defined, work it backwards to show unique values for all columns, all columns - 1, all columns - 2 and so on back to the initial column in the index.
    Why does this seem important? On Oracle I can generate histograms but those can often screw up SAP. On other DBs, the indexing cardinality is much more important, particularly with DB optimizers that make some odd decisions. So I need evidence I can push to folks who will only understand if there's a plain and simple analysis that explains it (almost) in crayon.
    I'm testing null values next (which worked!) but these suggestions all seem to follow the same idea which won't work in ABAP without some serious memory issues. So I'm down to this type of coding:
    exec sql.
    <dynamically generated true SQL>
    end-exec.
    rather than using ABAP with their concept of "open SQL" and the DB interface with all the overhead.
    RB's suggestion of the UNION ALL wasn't quite what I was looking for BUT it made me think that this would be a nice enhancement for evaluations!
    So the candidates that seem to work for what I wanted are as follows:
    SQL> SELECT COUNT (MIN (0)) AS distinct_col3_col4_cnt
    2 from rb group by b, c;
    DISTINCT_COL3_COL4_CNT
    7
    select count(distinct(b || c)) num_rows from rb;
    So thanks also to Frank, APNL and Nimesh for their examples. Now the fun starts as I spec out the processing.

  • Multiple Column text field in Static PDF form

    Okay, I'm pulling my hair out here. I am filling a .pdf form with itextsharp using powershell scripts. All this part of the issue is working fine.
    My problem is that I have the following data:
    A3015400R-2,A3015318R-1,A3015318R-2,A3015336R-1,A3015423R-1,A3015423R-2,A3015486R-1,A30153 06R-1,A3015240R-1,A3015102R-1,A3015333R-1,A3015120R-1,A3015158R-1,A3015333R-1,A3015400R-3, A3015400R-6,A3015400R-7,A3015234R-1,A3015234R-2,A3015400R-9,A3015306R-5,A3015311R-1,A30154 00R-2,A3015318R-1,A3015318R-2,A3015336R-1,A3015423R-1,A3015423R-2,A3015486R-1,A3015306R-1, A3015240R-1,A3015102R-1,A3015333R-1,A3015120R-1,A3015158R-1,A3015333R-1,A3015400R-3,A30154 00R-6,A3015400R-7,A3015234R-1,A3015234R-2,A3015400R-9,A3015306R-5,A3015311R-1
    That I would like to be displayed in columns across the page within one text field. So that the text field would look like this (approximately):
    A3015400R-2
    A3015318R-1
    A3015318R-2
    A3015336R-1
    A3015423R-1
    A3015423R-2
    A3015486R-1
    A3015306R-1
    A3015240R-1
    A3015102R-1
    A3015333R-1
    A3015120R-1
    I have the data sorted before I populate, so they go in numerical order, and i would like the be able to read them from top to bottom, left to right.
    I just can't figure out how to either:
    a) add multiple columns like I add multiple lines inside a text field
    or
    b) have multiple text fields linked together to thread the text input from fieldA to fieldB
    Any help would be much appreciated.
    edit: The data is actually in this format:
    A3015400R-2
    A3015318R-1
    A3015318R-2
    A3015336R-1
    A3015423R-1
    A3015423R-2
    A3015486R-1
    A3015306R-1
    A3015240R-1
    A3015102R-1
    A3015333R-1
    A3015120R-1
    A3015158R-1
    A3015333R-1
    A3015400R-3
    A3015400R-6
    A3015400R-7
    A3015234R-1
    A3015234R-2
    A3015400R-9
    A3015306R-5
    A3015311R-1
    A3015400R-2
    A3015318R-1
    A3015318R-2
    A3015336R-1
    A3015423R-1
    A3015423R-2
    A3015486R-1
    A3015306R-1
    A3015240R-1
    A3015102R-1
    A3015333R-1
    A3015120R-1
    A3015158R-1
    A3015333R-1
    A3015400R-3
    A3015400R-6
    A3015400R-7
    A3015234R-1
    A3015234R-2
    A3015400R-9
    A3015306R-5
    A3015311R-1
    Message was edited by: zombiejellyfish81

    Did you ever find any solutions to this problem?

  • Sorting a Collection with dynamic columns using a custom compare function for multiple columns

    I need help and ideas on how to sort a ListCollectionView.  My problem is complicated by 3 requirements-
         1. The column values contain HTML tags that needs to be removed before sorting (use custom compareFunction to strip HTML)
         2. The columns are dynamic, so dataField names are not known at compile time (need a single compareFunction for all columns)
         3. The data is used in an AdvancedDataGrid so multi-column sorting is required
    I have figured out how to solve any 2 of the 3 requirements.  However, I am having difficulties supporting all 3 requirements.
    Any help or ideas would be greatly appreciated.  Thanks.

    After playing with this some more I think I've figured out a solution.  This seems to work in initial testing.  Also, there is not a need to capture the current sort column in the headerRelease event which many offered solutions suggested.  Another benefit to this solution is that keyboard initiated sorting is handled also.  Whereas the headerRelease event is only triggered by a mouse click on the column header and special handling is required if the user uses the keyboard to access the column header.
    One point that I don't understand is how ascending/decending order is determined.  Behavior seems to be different between a single SortField versus multiple SortFields.  Notice how the compareResults are handled for the different situations.  Anyone out there know why???
     private function colSortCompareFunction(obj1:Object, obj2:Object, fields:Array = null):int{
         var compareResults:int = 0; 
         var newObj1:Object = new Object(); 
         var newObj2:Object = new Object();
          // should not be a condition that is met   
         if (_dataProviderDetails.sort.fields == null)     {
              var s:Sort = new Sort(); 
              var f:Function = s.compareFunction; 
              return f.call(null, obj1, obj2, fields);     }
         // when a single column is selected for sorting   
         else if (_dataProviderDetails.sort.fields.length == 1)     {
              var firstFld:SortField = _dataProviderDetails.sort.fields[0];
              newObj1[firstFld.name] = stripHTML(obj1[firstFld.name]as String);          newObj2[firstFld.name] = stripHTML(obj2[firstFld.name]
    as String);
              compareResults = ObjectUtil.compare(newObj1[firstFld.name], newObj2[firstFld.name]);
               return compareResults;     }
         // when multiple columns are selected for sorting   
         else       {
              for each (var fld:SortField in _dataProviderDetails.sort.fields)          {
                   newObj1[fld.name] = stripHTML(obj1[fld.name]
    as String);               newObj2[fld.name] = stripHTML(obj2[fld.name]
    as String);
                   compareResults = ObjectUtil.compare(newObj1[fld.name], newObj2[fld.name]);
                    if (compareResults != 0)               {
                        if (fld.descending)                    {
                             return compareResults * -1;                    }
                        else                      {
                             return compareResults;                    }
               return compareResults;     }
    Does anyone see any problems with this solution?
    NOTE:  stripHTML(String) is a simple function using regular expression to remove HTML tags.
    Thx

  • Multiple Column Header in Report (BEx and Web Reporting)

    Hi All,
            I've a requirement where my reports is having multiple column header.
       To be precise the column header is further divided into many sub-columns (upto 4 levels).
    Structure cannot help in this case since we have more than 2 such columns and we are using web reporting as well.
    Here is how it looks
                             <b>Header-A</b>
    Header-B1   |   Header-B2   |   Header-B3    |  Header-Bn
    Hdr-C1 |Hdr-C2 |Hdr-D1 |Hdr-D2 |Hdr-E1 |Hdr-E2 |Hdr-Fn..
    The above is a sample header structure.
    This report will be a Web Based report and I need to know whether its possible to do it in BEx also.
    We are not using Crystal Reports.
    If there is any document related to this, please mail to
    [email protected]
    Thanks & Regards,
    Chandran Ganesan

    Hi Chandran,
    I hope i am getting your problem right.
    If your
    Header-B1 | Header-B2 | Header-B3 | Header-Bn
    Hdr-C1 |Hdr-C2 |Hdr-D1 |Hdr-D2 |Hdr-E1 |Hdr-E2 |Hdr-Fn..
    are a set of key figures, then there is an option.
    For example:
    You drag Header-B1,Hdr-C1 |Hdr-C2
    into column section.Right click on Hdr-C1, Hdr-C2 and select down under. So your Hdr-C1, Hdr-C2 will be under
    Header-B1.
    Like wise drag Header-B2,Hdr-D1,Hdr-D2
    Right click on Hdr-D1,Hdr-D2 and say Down under and these two will fit below Header-B2.
    You can repeat the above steps for Header-B3... Header-Bn
    The output will be same as the one you have specified above.
    Hope it helps,
    Regards,
    Parth.

  • Help! Multiple Column Output

    Hi everyone. I'm hoping someone can help me work through this
    problem I'm having outputting data to multiple columns. I'm
    creating a photo gallery and I would like my table to look
    something like this: empty td, td with photo, empty td, td with
    photo, new row below those td's with a caption for the photo. I've
    taken tutorials online, but none of them explain how to have
    additional rows, or additional columns. Thanks in advance for any
    help!

    straffenp wrote:
    > Hi everyone. I'm hoping someone can help me work through
    this problem I'm
    > having outputting data to multiple columns. I'm creating
    a photo gallery and I
    > would like my table to look something like this: empty
    td, td with photo, empty
    > td, td with photo, new row below those td's with a
    caption for the photo. I've
    > taken tutorials online, but none of them explain how to
    have additional rows,
    > or additional columns. Thanks in advance for any help!
    >
    It is all a matter of figuring out what you want to output
    for each
    iteration and developing your logic accordingly. The tricky
    part I see
    with your requirement is that you will need to create two
    loops through
    each row of output you want, the first loop to create the top
    row and
    the second loop to create the bottom.

  • Index Multiple Column of Multiple Tables

    Hi All,
    I would like to know how to create a index which can search through all column in my database tables. Eg: I have 30
    tables and every tables have around 10 columns. I want to create a index which can search through the columns in
    these tables.
    I know that User_DataStore can helps in create multiple column search across multiple tables. But in my case the BLOB
    created will be very huge. Any work around? I mean is there any solutions like concatenated datastore?
    Thank You.
    Regards,
    LG Tan

    Hi,
    I figured out how to do this today. The first thing is that the type of index you need is a USER_DATASTORE.
    The idea behind this type of index is pretty straight forward but the documentation does a very good job of not drawing attention to just how powerful it is.
    The idea behind a USER_DATASTORE is that you can write your own stored procedure to extract the data that you want to index and return it to the indexer. Take an example where you have a master table which contains enough information to allow you to find associated data in other tables i.e. a shared key. The idea is that when you set up a USER_DATASTORE index, you specify the name of a stored procedure that the indexer will call for each row in the master table. The stored procedure has one input and one output parameter, rowid (in) and clob (out).
    When the index is created, the stored procedure you specify is, as I said above, called for each row in the master table. Your stored procedure uses this ROWID to extract the shared key (this can be anything you want) from the master table and uses this to build the necessary SELECT statement to retrieve the related data from the other tables. The rest of the stored procedure simply appends the data returned from your select statement to the return CLOB. The indexer then indexes the inforamation in this CLOB and discards the data.
    The index can of course only return hits against the master table. It's up to your application to extract shared key from the returned row(s), bind to the other tables and present the results.
    You will find a basic example of how to implement USER_DATASTORES in the Oracle Text Reference Guide (http://download.oracle.com/otndoc/oracle9i/901_doc/text.901/a90121.pdf). Feel free to email me if you want some example code.
    Dean

  • Compute average of a report column

    Hi,
    I got stuck with a problem. My problem is to compute average of a report column and display it on the bottom of the report. I searched the solution on apex forum but not get any solution.
    So, Please help me. It's urgent for me.
    Thanks
    -PK

    I've thought of the following solution. It's not the prettiest but I think it achieves what you're after or at least might come close.
    Edit the report region source to something along these lines:
    select salesperson as salesperson, total as total, 1 as sort_val from sales_figures
    union
    select 'Average' as salesperson, avg(total) as total, 2 as sort_val from sales_figures
    So the above query returns the sales person and their sales total unioned with a query returning the text 'Average' with the average sales totals. The sort_val value has been added to be able to sort by this value to ensure the 'Average' figure appears last by editing the report attributes to show salesperson & total, not show sort_val but sort by sort_val first.
    You won't be able to have sort on the report columns though as this would move the 'Average' figure from the bottom of the report where it's expected to be displayed.
    Does the average need to be part of the report?
    Could you calculate the average and display it within a page item below the report instead?

  • Find MIN, MAX of multiple rows from multiple columns

    Hello,
    I need to figure out how to pull the MIN/MAX of multiple rows from multiple columns into one column. Even if some are NULL/blank.
    For Example: (C: Column, R: Row, N - NULL/Blank)
    C:____1____2____3____ 4____Max
    R:____20___22___13____4____*22*
    R:____N____N____32____14___*32*
    R:____N____12____N____N____*12*
    That is, it always gives a value for MIN/MAX unless there are NO values in all the rows of the columns.
    So if there is one value, it will select that for the MIN/MAX, as it's the smallest/biggest since there is nothing to compare it to.
    Here is my current code:
    CASE WHEN COLUMN 1 < COLUMN 2 THEN COLUMN 2 ELSE COLUMN 1 END

    Hi Thank you for your feedback, unfortunately, I just found out that EVALUATE Function is disabled in our environment for security reasons, so the only other way I've discovered is this:
    The problem is that none of the conditions in the case statement are met--so the column is set to null. You can add a WHEN statement (section 2 below) to catch the nulls. There are five cases to consider:
    Case 1: begin insp > bad order
    Case 2: begin insp < bad order
    Case 3: bad order only (begin insp is NULL)
    Case 4: begin insp only (bad order is NULL)
    Case 5: both begin insp is NULL and bad order is NULL
    1) If bgn-crm-insp-ob > report-bo-ob then bgn-crm-insp-ob
    (Case 1)
    CASE WHEN filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'bgn-crm-insp-ob') > filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'report-bo-ob') THEN filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'bgn-crm-insp-ob')
    2) If report-bo-ob is NULL then bgn-crm-insp-ob
    (Case 4, 5) for case 5, you will get NULL
    WHEN filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'report-bo-ob') IS NULL THEN filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'bgn-crm-insp-ob')
    3) Else report-bo-ob
    (Cases 2, 3)
    ELSE filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'report-bo-ob') END
    Hopefully this works, I'll give feedback if it does, or if you have any further suggestions please submit, again, THANK YOU SO MUCH ANYWAYS!

  • JDBC, SQL-SELECT: Aliases for multiple columns?

    Folks;
    using SQL, JDBC with MaxDB 7.6, I am used to doing something like
    SELECT A AS FOO_A, B AS FOO_B, C AS BAR_C FROM FOO, BAR WHERE ...
    in order to make table columns have names sometimes more "meaningful" than in the actual database scheme. In a give environment, I will have to do a
    SELECT * FROM FOO,BAR WHERE ...
    with the difficulty that FOO and BAR contain columns of the same name, yet they both contain too many columns to actually enumerate/alias each one of them manually. Playing around trying something like
    SELECT FOO.* AS FOO_*, BAR.* AS BAR_* FROM FOO,BAR WHERE ...
    of course didn't work, and browsing the web I found there is no "standard SQL" way of doing something like this. Using
    java.sql.ResultSet
    provides a
    getMetaData()
    method which allows for determining the "table name" for a given column in the fetched result set, but unfortunately, the outcome returned by this method always seems to be empty. So to ask:
    - Is there any way in MaxDB-SQL to allow for "aliasing multiple columns"?
    - Alternatively, is there a way to make an SQL query joining multiple tables in MaxDB issued through JDBC generally return table columns in a <tablename>.<columnname> rather than just <columnname> style?
    Thanks a bunch in advance, best regards.
    Kristian

    HI Kristian,
    afaik the resultset.getMetaData() method should provide a MetaData-object that in turn implements methods like getColumnCount() or getColumnName() etc...
    Can you provide a piece of code to demonstrate that this is not working?
    I just tested DB Studio and Squirrel SQL (both use JDBC to connect to the database) and both are able to correctly figure out the structure of the result set for a query like yours.
    Anyhow, the whole requirement is not supposed to be supported.
    In fact, it's already a kind of 'glitch' that results with non-unique columnnames are actually produced, since relational theory forbids such results.
    That's also the reason for why you cannot further work with such a resultset (e.g. use it in a join).
    Therefore, no workaround in place here.
    If you´re going to have a query like this rather often, you may think about using views and define the aliases there only once.
    And besides all this, if you've got many duplicate column names it might also be a unlucky data design.
    best regards,
    Lars

  • Comparison of multiple column values with a single column value

    I have two separate tables say Tab1 and Tab2
    I want to select some datas , which is common to both the tables.
    In tab1 , there is a column 'STATE' and it's value is 'A'
    In tab2, there are multiple columns for the state, say STATE_A,STATE_B, STATE_C ETC and a row is present with the following details
    STATE_A = 1, STATE_B =1 ,STATE_C =0,STATE_D=1
    I need to select STATE when STATE_A ='1',
    if my STATE='B', this STATE has to be selected since STATE_B =' 1', similraly
    if my STATE='D', this STATE has to be selected since STATE_D =' 1',
    If my STATE='C', STATE_C should not get selected since it's '0'.
    Is it possible to do this in a single SELECT statement, where I have some other checks also or else how can I achieve it?

    Maybe this will help
    Select * from STATE_MAS ;
    STATE
    A
    B
    D
    F
    H
    Select * from STATE_CHILD
      STATE_A   STATE_B   STATE_C   STATE_D   STATE_E   STATE_F   STATE_G   STATE_H   STATE_I   STATE_J
            1         0         0         1         1         0         0         0         0         0
    CREATE OR REPLACE FUNCTION GET_STATE (P_VAL VARCHAR) RETURN NUMBER IS
    V_SQL VARCHAR2(200);
    V_COL VARCHAR2(35);
    P_RETURN NUMBER ;
    BEGIN
    V_COL := 'STATE_'||P_VAL;
    V_SQL := 'SELECT 1 FROM STATE_CHILD WHERE '||V_COL||' = 1 ';
    EXECUTE IMMEDIATE  V_SQL INTO P_RETURN ;
    RETURN P_RETURN ;
    END;
    SELECT STATE FROM STATE_MAS
    WHERE GET_STATE(STATE) = 1 ;
    STATE
    A
    D

  • JTextAreaCellRenderer to wrap text in multiple columns... any better way?

    I would like to use a basic JTextArea cell renderer to wrap the text in a JTable cell, like in this thread
    http://forum.java.sun.com/thread.jspa?threadID=664671&messageID=3893724
    Although the technique works, a disadvantage is that it cannot be used "as is" for multiple columns due to the setRowHeight/revalidate issue. One suggested workaround was to keep track of the maximum row height, as described here:
    http://www.javaspecialists.co.za/archive/newsletter.do?issue=106
    Both seem a bit rough. Are there any other options or more efficient techniques for automatically wrapping text in a JTable cell?

    Hello, did you search online? there are many tutorials like this one: http://www.photoshopessentials.com/photoshop-text/text-effects/text-wrap/
    You simply create a path, substract the parts you do not need, then click with the text tool inside.
    Note that it is not a dynamic text wrap, you need to change it if you move the objects around.

Maybe you are looking for