Code not working in 9i but works in 10g........!!

Hi ,
In the above query , it is possible for me to identify how many duplicate ITEM are present. but my output should be like this
EMPID ITEM NAME
201 A D
301 A D
111 D A
11 D A
11 D A
122 E A
12 H A
11 H A
88 H A
44 H A
10 rows selected.
SQL> SELECT COUNT(*), ITEM
2 FROM JOINS
3 GROUP BY ITEM
4 HAVING COUNT(*)>1
5 ;
COUNT(*) ITEM
3 D
2 A
4 H
If i have 3 ITEM 'D'
EMPID ITEM NAME
1 A D
2 A D
1 D A
2 D A
3 D A
1 E A
1 H A
2 H A
3 H A
4 H A
Output should be like this that is I whould create a sequence for same items , then reset again and start for new Item.....
Can anyone give a suggestion how to achieve this
Thanks
AK
Message was edited by:
Ananda

Connected.
SQL> SELECT * FROM AK;
EMPID LNID
100 100
100 100
100 100
101 100
101 100
101 100
102 100
1025 100
1025 100
1025 100
1025 100
EMPID LNID
1025 100
1025 100
1025 100
1025 100
1025 100
16 rows selected.
SQL> merge into AK t using(select rowid rid, empid, lnid,row_number () over (par
tition by empid order by lnid) rn
2 from AK) x on (t.rowid = x.rid)
3 when matched then
4 update set t.lnid = x.rn
5 when not matched then
6 insert (empid, lnid) values (null, null);
16 rows merged.
SQL> SELECT * FROM AK;
EMPID LNID
100 1
100 3
100 2
101 3
101 2
101 1
102 1
1025 9
1025 7
1025 6
1025 5
EMPID LNID
1025 4
1025 3
1025 2
1025 1
1025 8
16 rows selected.
SQL>
This Merge statement I got from the forum only it works fine......... :)
How can achieve this type of output
EMPID LNID
100 1000
100 1000
100 1000
101 1001
101 1001
101 1001
102 1002
1025 1003
1025 1003
1025 1003
1025 1003
EMPID LNID
1025 1003
1025 1003
1025 1003
1025 1003
1025 1003
How can I achieve this .....................
Thanks in advance
Thanks
AK

Similar Messages

  • PS4 Game Voucher Code not working

    my PS4 Game Voucher Code not working and says: "The code you entered may not be correct or may no longer be valid" "Please check your entry (e-820000134)  

    Voucher codes are region-specific. For instance a US voucher won't work with a UK account. First thing to check is whether the voucher's region matches your account's region.

  • End Routine Code not Working after Support Pack Upgrade

    Hi BI Community,
    We have recently upgraded to SPS17 (BW SP19) for our production system and the code deriving the values of several attributes in the end routine of the transformation for one InfoObject (as info provider) does not work anymore. We have been trying to identify the root cause but the fact is that we did not change anything to the InfoObject and its transformation and this used to work fine. The strange thing is that when we debugged the code we could see the value of the aforementioned attributes was derived correctly but the value is just not updated to the InfoObject where we still see the old values for these attributes.
    We have a similar InfoObject with the same end routine code in the transformation and it is working fine. We are out of idea what could have caused this during the SP upgrade.
    Thanks in advance for your feedback.
    Regards,
    Peter

    Cannot say what might have caused it but one check you can perform.
    Open your transformation in change mode and you can see a button next to create end routine button, titled ' Update Behavior of End Routine Change', click on that and say all fields.
    Hope it helps...
    Regards,
    Ashish

  • .oam file of html5 video trigger code not working in Muse

    I simply want to have a video play on page load. I have done the code for a trigger on one <div> to automatically play a video in Edge. The video plays perfectly in browser preview, even with transparency intact! Just the way I want it. The problem is when I insert .oam file in Muse it doesn't work. Other animations of simple objects and key frames work fine in Muse. But, I can make much more beautiful animations for certain elements in After Effects, with transparency and integrate them with elements in Muse. The video, its transparency and other objects work great from Edge to browser preview but not when .oam file is exported and placed into Muse. I know, I wouldn't build an entire site like this, I just want one or two animations to play automatically, with out controls (which I've been able to do), when the page is loaded.
    I publish with business catalyst to a my own domain, with Creative Cloud.
    Attached is a video where I'm at.
    What is the code or method to get to work?

    HI,
    Ok. I know that mov is not supported in Firefox nor Chrome, now.
    When I put the trigger in Edge to play the .mov file, it works when I preview from Edge to Safari, and not in any of the other browsers. This leads me to think that Safari supports .mov files, with and without transparency.
    However, when I try to put the .oam file generated by Edge into Muse and run the page in Safari the video doesn't work. Is this a .mov support with Muse? Does the video need to be uploaded to the Adobe Business Catalyst server? Where I publish my site?
    .mov and transparency aside, I can't get any video to play in any browser from the .oam file placed in Muse. Nothing plays in preview nor when I publish in Muse. I get the previews to work from Edge for the corresponding video for each browser. And yes, when controls in put in it says wether the video is supported or not. But I would want no controls and the video to play automatically on page load. Ideally I would like transparency. But I realize that's a browser support thing.  I don't see why all browsers don't support all video types and WITH transparency. C'mon now it's almost 2014! Am I right or am I right? Ok, sorry.
    I followed everything in this Tom Green video. Pretty sure all my code is correct.
    http://layersmagazine.com/embedding-video-in-adobe-edge-animate.html
    Picture shows code for working .ogv in Edge preview but not from .oam file in Muse in preview nor publish.
    Not sure why it won't even show in preview from Muse. But thinking when I publish, the video must have to be local on the publish server right?
    Am I missing something? Do I need to insert HTML into Muse, not the .oam?

  • Open my closed hotmail account , code not worked

    Hi
    I closed my account hotmal by mistake , and I tray to open it 
    saliraouf​@hotmail​.com​ will be closed on 8/17/2014
    You're trying to sign in to an account that's going to be closed. If you continue, we'll reopen the account. If you cancel, your account stays marked for closure. 
    What do you want to do?
    I tray to use all the code sending by Windows but it appeerl le code does not work , tray another time , I have a week trying to open it but it still closed
    i posed the problem to technical support but i have not get any answors
    can you help me

    Hi,
    Seems this question is that you closed your Microsoft Account by mistake but now you can't cancel the action.
    Please note we provide support for Excel in the current forum, this question is beyond the scope. I think you can get this issue resolved with the help from this link below:
    http://windows.microsoft.com/en-us/windows-live/id-support
    I hope this will help.
    Regards,
    Melon Chen
    TechNet Community Support

  • Java code not working in Jsp page....

    I like to say to myself "there is no magic" when I come to a perplexing situation, today is one of those times.
    The following code when executed from the java class retrieves all the specified objects from the database and displays the requested attributes without issue:
    try {
    DBBody dbb = new DBBody();
    Entity[] allbods = dbb.retrieveAll(true);
    for(int k=0;k < allbods.length;k++) {
    Body body = (Body)allbods[k];
    System.out.println("From the dbase index position: " + k +" : " + "\n" + "Id: " + body.getId() + "\n" + "Type: " + body.getType() + "\n" + "Load: " + body.getLoad() + "\n XML:" + body.toXml() + "\n");
    dbb.close();
    } catch (Exception adb) {
    adb.printStackTrace();
    : the **exact same** code as displayed above when run in a Jsp only lists the values for the "body.getId()" and "body.getType()" methods...for a reason I can't discern, "body.getLoad()" and "body.toXml()" return empty strings in the Jsp. Everything else returns as when the code is run from the class. Both "getLoad()" and "toXml()" return strings but behind the scenes use StringBuffer objects that are converted to Strings...getId() returns an int and "getType()" returns a String also, but for whatever reason (to repeat) only those two attributes come through IN THE JSP, in the class ALL attributes are retrieved without a problem...so, what is wrong with Jsp? Java? I get no error message what so ever, just empty strings for the two specified method returns...what am I overlooking. I am running the embedded Jsp engine of the Jetty Http Server that I've incorporated into my application, which uses the latest Jsp version.
    Any help on this issue would be greatly appreciated.

    If you dont want to paste your code, then you will
    certainly not get any responses from the so called
    Java Engineers rest is left to you. We can get dukes
    elsewhere instead.
    SwarajSwaraj, I apologize if I was taken to be abrassive with my last comment, I myself am a java engineer so I have no animosity, as for your request to copy the entire code it is no longer needed I have solved the problem and the solution follows just incase anyone else runs into similar issues. It indeed had nothing to do with StringBuffer working improperly but rather it was how I was getting my dbase connection.
    As many of you who have developed applications with jdbc support to popular dbase vendors may already know, a connection must be established to the database by specifying various parameters, namely the name of the jdbc connection driver classes for the desired vendor (eg. "com.microsoft.jdbc.sqlserver.SQLServerDriver" for MS Sql Server instances) and the driver specific db connection url. Of course the driver classes must be available on the class path so that they can be accessed. Without these parameters the connection will not be initialized..well it turns out my "bug" was caused by my inadvertently ommitting the connection parameters in my Jsp, you might wonder "but you said it executed fine in the jsp except for the missing "getBody()" and "toXml()" results..how could it even execute at all if you didn't establish a connection?"
    The answer is I designed the application to use a default connection driver class (the jdbc odbc bridge driver) and a default connection url (one that is tied to my testing instance of MsSqlServer2000) it turns out that the jdbc odbc bridge is very light weight...it lacks support for certain very useful MsSql datatypes namely "ntext", I use the "ntext" type for fields that can grow to any size (stylesheet code,xml code...etc.) but the bridge driver doesn't support "ntext" BUT rather than throw an exception error like proper error handling would require it silently eats the request (very very bad) ...this exacerbated the problem I had significantly (had it thrown an error I would have known immediately that the connection was using the wrong driver and url and fixed it sooner) as it is ...I was led down blind allies thinking my code was faulty, (which it wasn't strictly speaking ..I was just missing some extra code to account for the possibility that the bridge driver is instantiated by accident) so after adding the following code above the Jsp code shown previously:
    //Configure a connection to a Microsoft Sql Database.
    DBConfig.setVendorId(DBConfig.MSSQL_VID);
    DBConfig.setDBHostId("xiassql");
    DBConfig.setDBHostPort("1433");
    DBConfig.setDBUrl(DBConfig.buildDBUrl());
    :The code worked perfectly. The "DBConfig" class does exactly that..allowing me to pass in connection attributes including the type of vendor "DBConfig.MSSQL_VID", (I have built in support for 5 popular vendors so far), the dbase host name "xiassql" and the port "1433" , then we build the url using the specified attributes and the connection is complete. After adding the code above the Jsp returned all the retrieved values perfectly. So, when testing applications that enable backend dbase connections if you get seemingly identical code behaving differently from class to Jsp, suspect an issue relating to your connection url and classes (assuming you have multiple support and a default value as I do in my app.) also any changes in the execution context from class to Jsp can cause similar errors (like not declaring the same classes at the top of the Jsp file , or less likely using an outdated Jsp engine!)
    Regards,
    PS I will take off the Duke Dollars on this question since I answered it myself!

  • Jsp code not working

    hello
    we have some class files that are in a zip file that the nw admin has included in the CLASSPATH.
    The code works on Windows w/Tomcat but not the remote Sun Web Server, we cannot get the connection to database due to the code not reading the class files.
    Has anyone come up against anything of this nature. Any thoughts are appreciated.

    yeah we're not getting the str replace error any more - heres index.jsp
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ include file="admin/include/db.jsp" %>
    <html>
    <head>
    <title>Toshiba Industrial Systems</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="common/css/master.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" language="Javascript" src="common/js/master.js"></script>
    <script>
    var strBCLink1 = "placeholder.html";
    var strBCLink2 = "index_oc.jsp";
    var strBCLink3 = "prod_100.jsp";
    var strBCText1 = "Industrial Systems";  
    var strBCText2 = "Uninterruptible Power Systems";
    var strBCText3 = "1000 Series";
    </script>
    <script language="JavaScript" type="text/JavaScript">
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <style type="text/css">
    </style>
    </head>
    <body>
    <table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="87">
    <%@ include file="_header.jsp" %>
    </td>
    </tr>
    <tr>
    <td align="left" class="backGlobalNav" valign="top" height="21" >
    <%@ include file="_nav_global.jsp" %>
    </td>
    </tr>
    <tr>
    <td align="left" valign="top" height="23">
    <%@ include file="_breadcrumb.jsp" %>
    </td>
    </tr>
    <tr>
    <td align="left" valign="top">
    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="160">
    <%@ include file="_nav_side_ups.jsp" %>
    </td>
    <td width="8" align="center" valign="middle"><img src="common/images/spacer.gif" alt="" width="1" height="1"></td>
    <td width="605" align="left" valign="top">
              <TABLE cellSpacing=0 cellPadding=0 width="100%"
    border=0>
    <TBODY>
                   <tr><td height="5"></td></tr>
                        <%
                        if(((request.getParameter("id3")==null))){
                        %>
    <TR>
    <TD width=605 align="left" valign="top">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="605" height="250">
    <param name="movie" value="admin/index_images/index.swf">
    <param name="quality" value="high">
    <embed src="admin/index_images/index.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="605" height="250"></embed></object>                                        
                        </TD>
    </TR>
                        <%}
                        else{
                        str1="";
                        Statement smt4l = conn.createStatement();
                        str1 ="select * from tbl_item where int_parent_id=" + request.getParameter("id3");
                        ResultSet rs_4l=smt4l.executeQuery(str1);
                        %>
    <TR>
    <TD width=605 align="left" height="250" valign="middle" bgcolor="#F0F0F0">
                             <table border="0" width="100%">
                                  <%while (rs_4l.next()){ %>
                                  <tr>
                                       <td>
                                            <a href="./<%=rs_4l.getString(str_link")%">?id1=<%=request.getParameter("id1")%>&id2=<%=request.getParameter("id2")%>&id3=<%=request.getParameter("id3")%>&id4=<%=rs_4l.getInt("int_item_id")%>" class="nav2ndOff">
                                            <%=rs_4l.getString("str_title")%>
                                            </a>
                                       </td>
                                  </tr>
                                  <%}%>
                             </table>
                        </TD>
    </TR>
                        <%
                        }%>
    <TR>
    <TD vAlign=top align=left></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left height=5><IMG height=1
    alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left> <TABLE cellSpacing=0 cellPadding=0 border=0>
    <TBODY>
    <TR>
    <TD vAlign=top align=left> <TABLE cellSpacing=0 cellPadding=0 width=605
    border=0>
    <TBODY>
    <TR>
    <TD class=backGrayMed height=17 align="left" valign="middle"><SPAN
    class=contentBoxOC> Featured Products</SPAN> </TD>
    <TD class=backWhite width=1><IMG height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD class=backGrayMed align="left" valign="middle"><SPAN
    class=contentBoxOC> News</SPAN></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left width=399><IMG
    height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD class=backGrayLight vAlign=top align=left
    width=1 rowSpan=2><IMG height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD vAlign=top align=left width=200 height=10>
    <!-- LiveEdit marker DO NOT REMOVE -->
    <IMG
    height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td height="237" align="left" valign="top">
    <table width="405" border="0" cellspacing="0" cellpadding="0">
    <!---->
                                                           <!---->
    <%
                                                                Statement smt_featured = conn.createStatement() ;
                                                                ResultSet rs_featured=smt_featured.executeQuery("select * from tbl_item where int_parent_id= 0 and bit_featured=1");
                                                           %>
    <tr>
    <%
                                                           int i=0;
                                                           while(rs_featured.next()){
                                                           i++;
                                                           Statement smt_featured1 = conn.createStatement() ;
                                                           ResultSet rs_featured1=smt_featured1.executeQuery("select * from tbl_item where int_item_id= "+rs_featured.getInt("int_item_id"));
                                                           rs_featured1.next();
                                                           %>
    <td width="1"></td>
    <td width="190" height="190" align="left" valign="top" style="cursor:hand">
    <table width="100%" height="190" border="0" background="common/images/featured/back_box.gif" cellpadding="0" cellspacing="0">
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td height="18" colspan="2" align="left" valign="bottom" class="headerMainProdFeature">
                                                                     <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>" class="headerMainProdFeature" >
                                                                     <%
                                                                     if((rs_featured.getString("str_title").length() )>20){
                                                                          out.print(rs_featured.getString("str_title").substring(0,20));
                                                                     else{
                                                                          out.print(rs_featured.getString("str_title"));
                                                                     %>
                                                                     </td>
    </tr></a>
    </a>
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td height="10" colspan="2" align="left" valign="bottom" ><a href="#" class="navfeat"><%=rs_featured.getString("str_subtitle")%></td></tr></a>
    </a>
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td height="94" colspan="2" align="center" valign="middle"><a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>"><img src="admin/product_images/<%=rs_featured.getString("str_image")%>" border="0"></td></tr></a>
    </a>
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td width="100%" height="16" align="right" valign="middle"><img src="common/images/featured/arrow.gif" width="17" height="18">  </td>
    </tr></a>
    </table>
                                                                </td>
    <td width="9"></td>
    <%if((i%2)==0){%>
    </tr>
    <tr>
    <td height="9"></td>
    </tr>
    <tr>
    <%}
                                                                }%>
    <td></td>
    </tr>
    <tr>
    <td height="8"></td>
    </tr>
    <tr>
    <td height="8"></td>
    </tr>
    </table> </td>
    </tr>
    </table> </TD>
    <TD vAlign=top align=middle> <TABLE cellSpacing=0 cellPadding=0 width="95%"
    border=0>
    <TBODY>
    <%
                                                      Statement smt_news = conn.createStatement() ;
                                                      ResultSet rs_news=smt_news.executeQuery("select * from tbl_news where bit_active=1 and bit_featured=1");
                                                      while(rs_news.next()){
                                                      %>
    <TR>
    <TD vAlign=top align=center><IMG
    src="common/images/featured/82.gif" alt="" width="3" height="5"
    border=0></TD>
    <TD vAlign=top align=left> <A class="pr" href="./admin/news/<%=rs_news.getString("str_link")%>" target="_blank">
    <%=rs_news.getString("str_title")%>
    </A> </TD>
    </TR>
    <TR>
    <TD vAlign=top align=left><IMG height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD vAlign=top align=left height=6>
    <!-- LiveEdit marker DO NOT REMOVE -->
    <IMG
    height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    </TR>
    <%}%>
    <TR>
    <TD vAlign=top
    align=left></TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    </TR>
    </TBODY>
    </TABLE>
                                       </TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    </TR>
    </TBODY>
    </TABLE></td>
    <td align="left" valign="top"> </td>
    </tr><tr>
    <td height="5" colspan="4"><img src="common/images/spacer.gif" width="1" height="1"></td>
    </tr>
    <tr>
    <td height="30" align="left" valign="top" colspan="4">
    <%@ include file="_footer.jsp" %>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    and here is db.jsp
    <%@ page import="com.oreilly.servlet.MultipartRequest,java.io.*;"%>
    <%!
    String nl2br(String str){
         str=blanknull(str);
         return str.replaceAll("\n", "<br>");
    String addslashes(String str){
         str = str.replaceAll("'", "''");
         return str;     
    String getExtention(String str){
         int pos = str.indexOf(".");
         return str.substring(pos,str.length());
    String getExtention1(String str){
         int pos = str.indexOf(".");
         return str.substring(pos+1,str.length());
    String convertFileSize(long size) {
         int divisor = 1;
         String unit = "b";
         if (size >= 1024 * 1024) {
              divisor = 1024 * 1024;
              unit = "M";
         else if (size >= 1024) {
              divisor = 1024;
              unit = "K";
         if (divisor == 1) return size / divisor + " " + unit;
         String aftercomma = "" + 100 * (size % divisor) / divisor;
         if (aftercomma.length() == 1) aftercomma = "0" + aftercomma;
         return size / divisor +  " " + unit;
    String highlight_key(String str, String key,String color){
         //str = str.replaceAll("(?i)"+key, "<font color='"+color+"'><b>"+key+"</b></font>");
         return str;
    String first_sentence(String str, String key){
         int pos = str.indexOf(".");
         if(pos==-1){
              pos=str.length();
              return str;
         String str1=str.substring(0,pos);
         int pos1 = str1.indexOf(key);
         if(pos1==-1 && pos!=str.length()){
              str=str.substring(pos+1,str.length());
              return first_sentence(str,key);
         else{
              return str1;
    String blanknull(String s) {
    return (s == null) ? "" : s;
    String removeslashes(String str){
         str = str.replaceAll("''", "'");
         return str;     
    void sendmail(String to,String from, String subject, String message){
    //String from="[email protected]";
    //String to="[email protected]";
    try{
         SmtpClient client = new SmtpClient("mail.xxxxx.xxx");
         client.from(from);
         client.to(to);
         PrintStream message = client.startMessage();
         message.println("To: " + to);
         message.println("Subject:  "+subject+"!");
         message.println(message);
         message.println();
         message.println();
         client.closeServer();
      catch (IOException e){     
         System.out.println("ERROR SENDING EMAIL:"+e);
    %>
    <%
    Connection conn = null;
    //String dbUrl = new String("jdbc:mysql://localhost/toshiba?user=root&password=");
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    conn = DriverManager.getConnection("jdbc:oracle:thin:@10.0.112.92:1524:cweb","mhunter","chester");
    Statement smt = conn.createStatement() ;
    String path=getServletConfig().getServletContext().getRealPath("admin");
    String imagepath=path+"/product_images";
    String tagpath=path+"/tag_files";
    String newspath=path+"/news";
    String envpath=path+"/env_images";
    String resumepath=path+"/resume_files";
    String pagepath=path+"/pages_files";
    String downloadpath=path+"/download_files";
    %></a>

  • JQuery Code Not Working (Positioning Nav at a fixed point)?

    Hello So lets just cut to the cace,
    This code does work outside of Edge but doesn't work in edge. . . .
    $(window).bind('scroll', function () {
            sym.$("arroworb").addClass('fixed');
    The Object i want to keep in its place at all times even if the scroll bar is moved has the div ID of arroworb. . .
    I have no Idea what i am doing wrong but yeah the code does work it just doesn't when put into Edge
    My guess would be the window or blind has something to do with it not working but I have no idea how to fix this,
    Any idea's?
    Thanks In Advance!

    Here is a small example, using animate, as Joe mentions.
    In Stage > compostionReady
    $(window).scroll(function(){
           var element = sym.$("arroworb");
           element.stop()
      .animate({"marginTop": ($(window).scrollTop() + 30) + "px"}, "slow" );
    View here http://www.heathrowe.com/edge/scroll_with_page/
    Download here http://www.heathrowe.com/edge/scroll_with_page/scrollwithpage.zip
    hth
    Darrell

  • SQL Code not working in Forms Developer?

    Hi all,
    I'm using Oracle 10g and I have th following code running on iSQL+ but not working on Forms and I got the following erro
    The SQL code:
         select returningreason
            from (
                     select returningreason,
                     dense_rank() over (partition by 1 order by count(*) desc) as drnk
                     from returned_goods
                     group by returningreason)
           where drnk = 1;And the error happens near the word over to the right and the error statement is:
    Error 103 at line 18, column 19
       Encountered the symbol "(" when expecting one of the following:
             , formThanks in advance :)

    Triggers are compiled in forms so need to use only the features available to forms, which doesn't include all the new stuff in the database.
    select over partition
    NVL2They don't work in forms and reports too.
    Also if you use them in record Group
    Forms/SQL Compiler was not lined up to the database(10G).
    Meanwhile,for example. Pipelined TABLE and relative Select work in Reports AND Forms.

  • URGENT NEED OF HELP!! Gift code not working!

    Hi everyone, I have a flight tomorrow and I wanted to make sure I was set in terms of music. Since I am from Hong Kong, I bought a 3 Month Spotify Premium card from 7-11 and tried to redeem it the day after. Not only was the actually spotify.com site not working for me (repeatedly telling me that there was a "502 Bad Gateway" error), but when I tried to redeem it via phone, it told me multiple times that the code was not valid or that there was an error and I should try again (and I did, several times). I also found another code on the receipt that gave me the same answer.  Is there no phone number to contact Spotify at? Is this normal? How can I securely redeem this code? Please answer ASAP as I'm in a rush for tomorrow and very, very frustrated... 

    Please read this:
    https://community.spotify.com/t5/Ongoing-Issues/Gift-cards-starting-with-INC-aren-t-redeeming/idi-p/1161146#M6584

  • ALERT code not working, need help.

    Hello Everyone,
         i'm working in forms 10.1.2.0.2 and i have written some code to call an Alert when the user puts in an invalid number, however, the alert isn't poping up and the cursor will not move out of the field.  This is on a post-text script.
    basic:
    declare
      al_button number;
    al_id alert;
    begin
    i select 3 columns from a table based on input by the user.
    if the input is valid, then the form is populated.  This works no problem.
    however, when the following is not true, the cursor will not leave the field, but the alert will not pop up either.
    if v_nsn = nvl(t_rnsn, 0), then
    select the values and put them in the form.
    else  -- this is not working
    al_id := find_alert ('BAD_NSN_ALERT34');
    if Id_null(al_id) then
    message ('THE ALERT NAMED BAD_NSN_ALERT34 DOES NOT EXIST');
    RAISE FORM_TRIGGER_FAILURE;
    else
    al_button := SHOW_ALERT(al_id);
    if al_button = alert_button1 then
         ...DO SOMETHING;
    else al_button := show_alert (al_id);
    if al_button = alert_button2 then
    do something;
    end if;
    end if;
    end if;
    end if;
    end;

    Why are you using a Post-Text-Item trigger instead of a When-Validate-Item trigger?  How is your user leaving the field that this trigger is attached to?  If the user is mouse-clicking to leave the field - the Post-Text-Item trigger will not fire.  Take a look at the "Post-Text-Item trigger Restrictions" listed in the Forms Help system for this and other restrictions on using the Post-Text-Item trigger.
    Craig...

  • My Nokia 5310 Xpressmusic master code not working

    hi
    i am using nokia 5310 Xpressmusic and my phone IMEI is xxxxxxxxxxxxxxxxxxx that i got by using *#06# and using this IMEI i got the master code for my mobile is 4604172520 but while i try to restore factory setting this master code is not working please help me to retrieve my phone master code so that i can reset my phone.
    Regards,
    Hussain
    Moderator's note: IMEI removed from post. Please don't post your IMEI number on the Discussion Board.

    Dear globalguideline,
    Welcome to the Discussion Boards!
    The "master codes" are a myth, and don't work!
    If you forgot your phone's security code, only a Nokia Care Point can reset the security code.
    Kind regards,
    kingblue

  • Customized Button code not working on selection screen.

    Hello Experts,
    I have a button on the selection screen next to Execute button on the Application Tool Bar.
    I have written some validations on the button.It was defined on the PF-Status and its funtion text i have given as 'Show'.
    But the problem is that the code is not working.When I execute the button,the screen just remains their.
    The sy-comm always returns the value of 'UCOM' for whatever even takes place on the screen.The execution of the program does not stops their in debugger.
    Can anyone help me with some sample code and also provide the value of sy-ucomm which i should use for the customized button.
    Good points will be rewarded.

    Here is the short program which will show how to do it. You are simply checking for the USER-COMMAND value CHK and changing it to ONLI which is the F8 button, then the START-OF-SELECTION will be fired and you can output the list.
    REPORT zyou_0001.
    TABLES:  sscrfields.
    SELECTION-SCREEN PUSHBUTTON 2(10)  pbut1 USER-COMMAND chk.
    AT SELECTION-SCREEN OUTPUT.
      pbut1 = 'Test This'.
    AT SELECTION-SCREEN.
      IF sscrfields-ucomm = 'CHK'.
        sscrfields-ucomm = 'ONLI'.
      ENDIF.
    START-OF-SELECTION.
      DO 10 TIMES.
        WRITE:/ sy-index.
      ENDDO.
    Regards,.
    Mohammed

  • Redemtion code not working - what do I do?

    I have bought and downloaded Photoshop elements 13 and now have an activation cod- wich I figure is also my redemtion code? But it is not working and I therefore can not get my serial number - does anyone know how to resolve this?

    An activation code is a 24 digit numerical series of numbers - they are your serial number, not your redemptioon code.  The redemption code is used to acquire the serial number as you have indicated, but you might have a serial number there instead of an redemption code.
    Redemption Code Help
    http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • Sound code not working

    As you can see, this is a very simple code to play a sound.
    however it is not working, i don't see any reason why is not
    working but it says that play is not a property of snd.

    "ChicoNERD" <[email protected]> wrote in
    message
    news:gi18it$1v3$[email protected]..
    > As you can see, this is a very simple code to play a
    sound.
    > however it is not working, i don't see any reason why is
    not working but
    > it
    > says that play is not a property of snd.
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > layout="absolute">
    >
    > <mx:Panel width="300" height="150" title="MP3
    Player">
    > <mx:Script>
    > <![CDATA[
    > var snd:Sound = new Sound(new
    URLRequest("smallSound.mp3"));
    > snd.play();
    >
    > ]]>
    > </mx:Script>
    > </mx:Panel>
    > </mx:Application>
    Youi can't issue function calls unless you're within a
    function.
    HTH;
    Amy

  • AS3 code not working if i add a scene before the as3 code scene

    Hi,
    I have an Actionscript coded flash file which run perfectly without any error.
    I am not getting why it shows an error after i do insert a scene before or a frame before the current frames;
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at myFile_fla::MainTimeline/frame2()
        at flash.display::Sprite/constructChildren()
        at flash.display::Sprite()
        at flash.display::MovieClip()
        at myFile_fla::images_mc_1()
    I am moving all frames along with actionscript to next frame as i want add preloader to it.
    can anyone specify the reason?
    Thank you.

    Hi,
    I have all code on same frame, all movie clips on same frame and all movie clips instance names are correct. My code is working fine if I do not move all frames to Frame2. but i need to move all these frames to Frame 2 so that i can add preloader.
    After debugging I got that its stopping at following action;
    Object(this).movie01_mc.movie01child_mc.visible = false;
    I tried it making;
    Object(root).movie01_mc.movie01child_mc.visible = false;
    but no use.
    Is it necessary to have all of it in first scenes first frame?
    Thank You

Maybe you are looking for