Instr function for table column

hi,
lets consider the basic soctt.emp table. i need to check for the first occurence of 'a' in the Ename column in emp table.
select instr(ename,'a') from empabove function does not seem to work
Please advise.
Regards

Hi,
sri wrote:
but how would be the query if we have ,(comma) in place of 'A'.
select instr(ename , ',') from empwill this work.What happens when you try it?
If it's not doing what you want, then post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data. Dplain how you get those results from that data.
If you can show the problem using commonly available tables (such as those in the scott or hr schemas) then you don't need to post any sample data, just the results and explanation.
Always say which version of Oracle you're using.

Similar Messages

  • Max function for table having no rows

    Hi All
    I have a table in which initially no rows. I am running max() function for a column and then wnats to add 1.
    But when no rows there below code in not working
    select max(code) into p_maxCode from cms_codedetails where codetypeid=0;
    p_maxCode:=p_maxCode+1;
    dbms_output.PUT_LINE('p_maxCode: '||p_maxCode);
    result is:
    p_maxCode:
    How can I handle the this to get 1 if no rows in the table .

    Hi !
    Max function in yur case returns NULL and then
    null + <anything> ... is still null
    You can do
    p_maxCode:=nvl(p_maxCode,0)+1;
    or
    select nvl(max(code),0) into p_maxCode from cms_codedetails where codetypeid=0;
    Of course if YOU have decide that null in this case can be treated as 0
    T

  • Change Font Size for Table Column

    Hi,
    How can we set different font sizes for table columns?
    Thanks,
    Uma.A

    Hi
    Set Design property of table column
    Aslo check this link
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/66/18b44145143831e10000000a155106/frameset.htm
    Thanks

  • How to use simple types for table column names ?

    Hi,
    can any one tell how to to use simple types for table column names?
    It is required in internationalizing of webdynpro applications.
    Regards,
    Rajesh

    Hi,
    1: define required column names in <SimpleType>
    2:use the following code to get those values
    3:bind 'text' property of Column headers to context attributes
    4:take a context attribute 'Value' as type of <SimpleType>
    5:set these values to context attributes
    IWDAttributeInfo objAttrInfo=wdContext.getNodeInfo().getAttribute(IPrivate<ViewName>View.IContextElement.VALUE);
    ISimpleTypeModifiable simple=objAttrInfo.getModifiableSimpleType();
    Map m=simple.getEnumerationTexts();
    Collection c=m.values();
    Iterator it=c.iterator();
    if(it.hasNext())
    wdContext.currentContextElement.set<att1>(it.next().toString);
    if(it.hasNext())
    wdContext.currentContextElement.set<att2>(it.next().toString);
    if(it.hasNext())
    wdContext.currentContextElement.set<att3>(it.next().toString);
    Regards
    LakshmiNarayana

  • Header1 size is required for Table Column header

    Hi Friends,
    I wanted to use Header1 size for Table column headers. Pls help me how to do.
    Now I am using external label with Header1 size to the table but labels are not aligned properly with the table columns.
    Regards,
    Lakshmi Prasad.

    Hi,
    For headers design property is not their so you cant change the font. Other option is to change the theme (Not tried personally).
    Regards
    Ayyapparaj

  • How to get the F4 help for table columns ..

    Dear All,
    Here I have created table with cell editors of INPUT FIELD .
    And I would like to provide the f4 help for those columns .
    Here I have checked the node , which i have binded to the table, there input help mode is set to Automatic and search helps are also attached for that node .
    But in the table I am not getting the F4 help . Where as if i create the input fields invidually i am able to see the F4 help .
    But for table column I am unable to find..
    Help me regard this...
    Thanks & regards,
    Veerednra Nath

    Hi,
    In debugging , the I have seen the node info attributes list ( VALUE_HELP_ID and VALUE_HELP_MODE ) .
    For you understanding, Here I am giving the values which contains ,
    VALUE_HELP_ID contains the AUTO:VBUK
                                                    AUTO:VBUP
                                                    AUTO:MAT1
                                                    AUTO:H_T023
    and
    VALUE_HELP_MODE contains the  all Zeros for all the four attributes .
    Hope I have given correct inputs .
    Thanks & Regards,
    Veerendra Nath

  • Frame 9 solution for table column + side head does not work in Frame 10 and 11

    In Frame 9 structured (DITA) we could force Frame to record the actual widths of table columns in the DITA XML.  Frame 9 would respect the widths when opening the file.  This was particularly useful for forcing tables to be wide -- to go across the column and the side head -- and for the columns to never resize. 
    In Frame 9 this was done by commenting out the line
    "writer use proportional widths;" 
    like this
    "/* writer use proportional widths; */"
    in the topic.rules.text" file located in
    "...\FrameMaker9\Structure\xml\DITA\app\DITA-Topic-FM"
    This no longer works in Frame10 and Frame 11.  Even though the same line is commented out in all the "NAME.rules.txt" files in all the subdirectories of
        "...\AdobeFrameMaker11\Structure\xml\DITA_1.2\app"
    and
        "...\AdobeFrameMaker11\Structure\xml\DITA\app"  
    and
        "...\AdobeFrameMaker10\Structure\xml\DITA_1.2\app"
    and
        "...\AdobeFrameMaker10\Structure\xml\DITA\app"  .
    Commenting out the line does force Frame 10 and 11 to record  the absolute column width (2.357" etc.) in the DITA XML.
    However, on Open,  Frame 10 and 11 force the table to fit in the column, not the column and sidehead. That is they behave as though they were still using proportional column widths.  It seems the original values (as inserted by Frame 10 and 11 before closing!) are recalculated on Open, thereby mimicking the default proportional width behavior.  
    For example, this on Save then Close from Frame 10 or 11
    <table frame = "topbot" colsep = "0" rowsep = "1">
    <tgroup cols = "4" colsep = "0" rowsep = "1" outputclass = "FormatB">
    <colspec colnum = "1" colname = "1" colwidth = "1.796in" colsep = "0"/>
    <colspec colnum = "2" colname = "2" colwidth = "1.852in" colsep = "0"/>
    <colspec colnum = "3" colname = "3" colwidth = "1.179in" colsep = "0"/>
    <colspec colnum = "4" colname = "4" colwidth = "2.152in" colsep = "0"/>
    goes to this on Open then Save: 
    <table frame = "topbot" colsep = "0" rowsep = "1">
    <tgroup cols = "4" colsep = "0" rowsep = "1" outputclass = "FormatB">
    <colspec colnum = "1" colname = "1" colwidth = "1.351in" colsep = "0"/>
    <colspec colnum = "2" colname = "2" colwidth = "1.393in" colsep = "0"/>
    <colspec colnum = "3" colname = "3" colwidth = "0.887in" colsep = "0"/>
    <colspec colnum = "4" colname = "4" colwidth = "1.618in" colsep = "0"/>
    Any help at all would be appreciated!  
    We have 8,000 to 10,000 pages to PDF in the next few days and about 33% of those pages are messed up tables!
    Message was edited by: borealforest

    Hi...
    Unfortunately, I don't have any insight into the default DITA table handling in FM10 or FM11 .. so can't give you the answer you're looking for. Since both FM10 and FM11 offer ExtendScript, you could write a script (or have one written) that processes all of your files to reset the table widths. Or, perhaps the best short term solution may be to reinstall FM9 to get the job done, then spend more time later to figure out a better solution.
    One alternative would be for you to use DITA-FMx, which supports the table/@pgwide attribute for controlling which tables span the page and which don't. Since your tables probably don't make use of this attribute, it won't help in the near term, but might make sense going forward.
    Cheers,
    Scott Prentice
    Leximation, Inc.
    www.leximation.com

  • Nested Composite Component Doesn't work for table column

    I have reported this issue as defect 1541 but I'm hoping someone my have a suggestion on a work around for this. Here is the issue
    I am attempting to use composites to represent a table column. I have tried this with both IceFaces and the standard implementation. I have a custom component that is of type UIColumn that is being inserted into another composite that houses a table. The table renders and the column renders. However, the outputText that should represent the row data does not render. Interestingly this will render using composites when I don't have the column rendering as a composite (IE the table is contained in the composite and the row level output is contained in the top level page.). That is not my requirement though. This seems to be a tough cookie to crack. I have the source now and am starting to acquaint myself with it in an attempt to figure out what is going on. Any brilliant ideas out there?
    Code is below.
    tableColumn.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <h:head>
    </h:head>
    <h:body>
    <composite:interface componentType="MyColumn">
    </composite:interface>
    <composite:implementation>
    <ice:column headerText="Make" id="column3">
    <composite:insertChildren />
    </ice:column>
    </composite:implementation>
    </h:body>
    </html>
    table.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <h:head>
    <title></title>
    </h:head>
    <h:body>
    <composite:interface>
    </composite:interface>
    <composite:implementation>
    <ice:dataTable augmentTitle="false"
    rows="10"
    value="#{SessionBean1.carDataProvider.tableDisplayList}"
    var="item" >
    <composite:insertChildren />
    </ice:dataTable>
    </composite:implementation>
    </h:body>
    </html>
    Example Page
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:temp="http://java.sun.com/jsf/composite/tempcomp"
    <h:head id="outputHead1">
    </h:head>
    <h:body>
    <ice:form id="form1">
    <temp:table>
    <temp:tableColumn>
    <ice:outputText id="outputText3" value="#{item.make}"/>
    </temp:tableColumn>
    </temp:table>
    </ice:form>
    </h:body>
    </html>
    The the new UIMyColumn class
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package icefacestestapp2;
    import com.icesoft.faces.component.ext.UIColumn;
    import javax.faces.component.FacesComponent;
    @FacesComponent(value = "MyColumn")
    public class MyColumn extends UIColumn {
    @Override
    public String getFamily() {
    return "custom";
    Interestingly the row text will not render even if I add it directly to the new
    composite column class as seen below.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <h:head>
    </h:head>
    <h:body>
    <composite:interface componentType="MyColumn">
    </composite:interface>
    <composite:implementation>
    <ice:column headerText="Make" id="column3">
    <ice:outputText id="outputText3" value="#{item.make}"/>
    </ice:column>
    </composite:implementation>
    </h:body>
    </html>

    Hi,
    I recall an issue in 10.1.3.2 with inner frames that had the wrong JavaScript reference to the DOM. So I assume this to be the same in your case. So you can give it a try with JDeveloper 10.1.3.3 and see if this fixes the problem
    Frank

  • 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

  • Soft enters for table column head breakup

    Hi,
    Can i have any option for the the below requirement?
    I need to give soft enters for all table column head breakup's. (see the below screen shot). When i export to HTML the column heads are run-in against the PDF output.
    Regards,
    Velu

    Hi Velu,
    try the following:
    var curDoc = app.activeDocument;
    var allTables = curDoc.stories.everyItem().tables.everyItem();
    app.findTextPreferences = app.changeTextPreferences = null;
    app.findTextPreferences.appliedParagraphStyle = curDoc.paragraphStyles.itemByName("TCH");
    var allFounds = allTables.findText();
    app.findTextPreferences = app.changeTextPreferences = null;
    for ( var i = 0; i < allFounds.length; i++ ) {
        var tableFound = allFounds[i];
        if ( tableFound.length > 0 ) {
            for ( var j = 0; j < tableFound.length; j++ ) {
                var curFound = tableFound[j];
                        var allParaLines = curFound.lines;
                        for (var n = allParaLines.length-2; n >= 0 ; n--) {
                            var curLine = allParaLines[n];                       
                            if (curLine.characters[-1].contents != SpecialCharacters.FORCED_LINE_BREAK) {
                                curLine.insertionPoints[-1].contents = "\n";
                            } // end if
                        } // end for
            } // end for
        } // end if
    } // end for
    –Kai

  • JDeveloper 10.1.3.4: text-align for table column has no effect

    Hi,
    I am using JDeveloper 10.1.3.4. In a tabe I have a column that displays numbers, which are left-aligned by default:
    Applied
    $50.00
    $2,160.00
    $50.00
    $2,260.00I want to have them aligned to the right to look neater:
    Applied
             $50.00
          $2,160.00
             $50.00
          $2,260.00Or better still, have the cell with the longest string aligned to the center, and all the other cells align to it by the decimal point:
        Applied
          $50.00
       $2,160.00
          $50.00
       $2,260.00I looked in the property inspector and the only thing that looks closest to the purpose is text-align. I set this attribute to right (text-align:right) for the column, and for the outputText, but neither has effect. Everything is still flush to the left. How to get it right?
    Thanks!
    Newman

    Hi, Branislav,
    Nice meeting you again.
    Last time the question was about formatting the total amount returned from the method, from String to Number, Re: JDeveloper does not handle expert SQL, cannot add query clause in view link, which can also format the number as currency.
    This time, your answer again solved my problem. I was looking in the inline styling section, and did not notice this property in the General section. Thank you so much for your help!
    Newman

  • Remain case for table column name

    Hello, i am a java developer. I had helped my company to develop a java application all the while and before this we are using ms sql server database. Recently, we want to migrate the database to oracle database. The problem is, in our application, we use the resultsetmetadata to retrieve all the table column name and respective data and store in hashtable, but in ms sql server the table column name is not all in uppercase. When our application try to get the data using hashtable.get("aColumnName"), it will fail because in oracle the column name is all in uppercase. There are more than 1000 jsp page and java code that used the same method to get data, so if i want to change all the code to uppercase, it will consume a lot of unproductive time, is there any way to solve this?

    I assume that your code builds an SQL statement like "select * from ??? where table_name = '????';".
    If this is correct just wrap the table_name in UPPER(table_name).
    If my assumption is incorrect then please give more information.
    James.

  • SUM function for a column made 'on the fly'

    I have access to a database, however only SELECT statements can be run on the database. Basically the database lists switches, these switches can have up to 20 computers connected to them but some do not. I need to know the switches which contail less than 20 computers so I know where there is space for more computers (I've wrote the code for this already). I also need something to keep a tally/total for the number of spare spaces left so I can run the script and go 'ok we have a total of 20 spare places for computers theres 10 on this switch and 10 on this one'.
    I just need to get the sum funtion working for the column that I've created 'on the fly', the column revealing the number of spare slots, heres the code I've got so far:
    SELECT switch, COUNT(*) as "Servers", 20 - COUNT(*) as "Spare slots"
    from dedicated_servers
    where switch like 'rs%'
    GROUP by switch
    HAVING COUNT(switch) < 20
    order by Servers;
    Which gives the following:
    | switch | Servers | Spare slots |
    | rsj14-1.dc | 12 | 8 |
    | rsj12-1.dc | 15 | 5 |
    | rsi2-2.dc | 16 | 4 |
    | rsj13-1.dc | 16 | 4 |
    | rsi2-1.dc | 16 | 4 |
    Just need something at the end saying TOTAL=25

    OK I'll have to make em up though, but they are something like this for one switch:
    INSERT INTO dedicated_servers (switch, server_number, switch_socket)
    VALUES (rsj-1.dc, 100, 18)
    On switch rsj-1.dc there can be upto 20 servers (the server_number is the primary key)
    Message was edited by:
    slowpoke115

  • Equal space for Table column Gutter?

    Hi All,
    I want to make the tables column between space equally by using the Scripting (InDesign CS5.5 Windows).  I'm stuggled in creating the algorithm to this task.  Is any one already completed this type of automation means please share your thoughts, or please suggest the algorithm you are using.?
    Thanks in Advance.
    Regards,
    Imagine.

    In the above snapshot In between columns are having the uneven spaces.  I need to give the even space between columns based on the maximum characters on that columns.
    Do you mean the equivalent of Table > Distribute Columns Evenly?
    No.

  • Get a focus for table column

    Hi, need your help again.
    How to do this:
    A JTable is inside a form, whenever this form is called out, the first row and first column in table must get the focus, with cursor blinking.
    Any way to do this?

    Hi,
    GROUP BY (using aggregate functions) is the best way to do what you described.
    PIVOT and UNPIVOT are probably what you'd want in this case.  The phrase "GROUP BY" may not actually appear in your code, but you'll essentially be doing a GROUP BY.
    Analytic functions (rather than aggregate functions) can do the job, too, but they'll be less efficient.  Analytic functions get you results about the groups, without losing each row's identify, but in this case, losing each row's identity is eactly what you want to do.  You only want 'Apple' to appear 1 time, not 3 times.
    The fact that you need to do the same query on 20 different tables suggests that there's something wrong with your table design.  Wouldn't it be better to have 1 big table, with a new column that has 20 unique values instead?
    I hope this answers your question.
    If not, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible.  For example, instead of posting a problem with 20 tables, each having 25 columns, post a similar problem involving, say, 2 tables, each with 3 columns.
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for

  • How can i Edit a Text layer of an After effects projects without opening it in After effects ?

    hello Adobe i'm a web developper student, and i want to build a website that can help to edit text layers of an animation made by After effects of Flash professional so how can i get or export an editable file of a video project that i can edit by co

  • So HDR photo mode only works with flash off?

    I noticed that when you turn the HDR photo mode on, the flash changes to off. If you try to put the flash back to on or auto, it turns HDR off.

  • Migrate assistance / Mail application Problems

    Hello, I bought a new Macbook Pro Lion, after I powered the mac, went to utilities app to use migrate assistant app to install my time capsule back up. Because I used the same name of the home folder whenI first booted the mac, it asked me to open a

  • Injecting_jndi_datasources

    I know in standalone client cannot access java:comp/env which is used in my server application from my previous post, so I try another method as follow to test the server method public void getEnvironment() throws Exception{      try{           Syste

  • What Applications are included in Creative Cloud Complete

    Creative Cloud Complete - 29.99 / mo Latest Photoshop, Illustrator, and more ? dose it include all Adobe Applications such as AE, Photoshop, Lightroom ,,, etc?