How to achive this using servlet

hi I am new to this technology... My requirement is , First I have to check whether that rebate_sku_num exists in the database or not.. If exits i need to update the row.. If now I have to insert the new row with values.. How to achive this..
my screen contains 7 rows... in will increase.. for every submit.. i have to check with the database.. whether the rebate_sku_num exists or not.. help me out.. here is my code.. i am not sure how to format my code.. in future i will do it...
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.SingleThreadModel;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import java.io.IOException;
import java.sql.ResultSet;
import java.io.*;
import java.util.*;
import java.util.Date;
import java.text.*;
public class AddRebate extends HttpServlet implements SingleThreadModel {
public void init(ServletConfig servletconfig) throws ServletException {
super.init(servletconfig);
public void doPost(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)
throws ServletException, IOException {
HttpSession session;
session = httpservletrequest.getSession(true);
String user_name;
String divisionCode;
String rebate_sku_num[];
String selectedMonth;
String amount[];
String message = "";
String Query="";
String RebateId="";
boolean flag = true;
// from here
Calendar todaysdate = new GregorianCalendar();
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
SimpleDateFormat sdf1 = new SimpleDateFormat("MM/dd/yyyy HH:MM:SS");
System.out.println("today's date: " + sdf.format(todaysdate.getTime()));
String entryDate = sdf.format(todaysdate.getTime());
String entryDate1 = sdf1.format(todaysdate.getTime());
System.out.println("entering date is " +entryDate) ;
System.out.println("entering date is " +entryDate1) ;
// to here
user_name = (String) session.getAttribute("user_name");
divisionCode = (String) session.getAttribute("division_code");
selectedMonth = httpservletrequest.getParameter("selectedMonth");
rebate_sku_num = httpservletrequest.getParameterValues("rebateId");
amount = httpservletrequest.getParameterValues("amount");
System.out.println("AddRebate : doPost() : selectedMonth = " + selectedMonth);
System.out.println("AddRebate : doPost() : rebate_sku_num = " + rebate_sku_num);
System.out.println("AddRebate : doPost() : amount = " + amount);
// from here
flag = true;
for (int z = 0; z < rebate_sku_num.length && flag; z++) {
try {
flag=false;
String s = "select REBATE_SKU_NUM from EASMSA_REBATE_SKU_DETAILS_TB where REBATE_SKU_NUM ='" + rebate_sku_num[z] + "'";
System.out.println("AdjustmentServlet : doGet() : checking sku validity query = " + s);
ResultSet resultset = DatabaseConnection.executeQuery(s);
if (resultset != null) {
while (resultset.next()) {
RebateId = resultset.getString("REBATE_SKU_NUM");
flag = true;
if ((rebate_sku_num[z] != RebateId)) {
System.out.println("get the values" +rebate_sku_num);
System.out.println("get the values" + RebateId);
Query = "INSERT INTO EASMSA_REBATE_SKU_DETAILS_TB " +
"( REBATE_SKU_NUM, REBATE_DATE, REBATE_AMT, CREATED_BY," +
"CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE ) VALUES (" +
"'" + rebate_sku_num[z] + "', " +
"TO_Date( '" + "30/" + selectedMonth + "', 'dd/MM/YYYY HH:MI:SS AM'), " +
"'" + amount[z] + "' , '" + user_name + "'" +
", TO_Date( '" + entryDate + "', 'MM/dd/YYYY HH:MI:SS AM')" +
", '" + user_name + "'," +
" TO_Date( '" + entryDate + "', 'MM/dd/YYYY HH:MI:SS AM'))";
System.out.println("query is executed" +Query);
}else if ((rebate_sku_num[z] == RebateId )){
Query = "update EASMSA_REBATE_SKU_DETAILS_TB set REBATE_AMT=" + amount[z] + " where REBATE_SKU_NUM='" + rebate_sku_num[z] + "'";
System.out.println("query is executed for updation" +Query);
} else {
System.out.println("AdjustmentServlet : doGet() : checking for sku validity : resultset null");
// message = "SKU '" + sku[z] + "' of customer '" + customer[z] + "' and location '" + location[z] + "' is not valid.";
message = "SKU '" + rebate_sku_num[z] + "' is not valid.";
flag = false;
} catch (Exception exception1) {
System.out.println("AdjustmentServlet : doGet() : exception in checking validity of SKU");
exception1.printStackTrace();
// message = "SKU '" + sku[z] + "' of customer '" + customer[z] + "' and location '" + location[z] + "' is not valid.";
message = "SKU '" + rebate_sku_num[z] + "' is not valid.";
flag = false;
try {
if (DatabaseConnection.executeUpdate(Query) == 0) {
System.out.println(" AddRebate : doPost() : rollback: error in executing update query= " + Query);
DatabaseConnection.rollBack();
message = "Some problem in updating transactions. Please try again later.";
flag = false;
// break;
} else {
System.out.println("AddRebate : doPost() : update sucessfull");
message = "Rebate Transactions has been updated.";
flag = true;
} catch (Exception ex) {
System.out.println("AddRebate : doPost() : exception in update query");
message = "Some problem in updating transactions. Please try again later.";
flag = false;
ex.printStackTrace();
session.setAttribute("message", message);
httpservletresponse.sendRedirect("Welcome1.jsp?s=y");
return;

Oh and you can give me the dukes for helping you here:
http://forum.java.sun.com/thread.jsp?forum=45&thread=475828&tstart=0&trange=15

Similar Messages

  • How to achive this using analytical function-- please help

    version 10g.
    this code works just fine with my requirement. i am tyring to learn analytical functions and implement that in the below query. i tried using row_number ,
    but i could nt achive the desired results. please give me some ideas.
    SELECT c.tax_idntfctn_nmbr irs_number, c.legal_name irs_name,
           f.prvdr_lctn_iid
      FROM tax_entity_detail c,
           provider_detail e,
           provider_location f,
           provider_location_detail pld
    WHERE c.tax_entity_sid = e.tax_entity_sid
       AND e.prvdr_sid = f.prvdr_sid
       AND pld.prvdr_lctn_iid = f.prvdr_lctn_iid
       AND c.oprtnl_flag = 'A'
       AND c.status_cid = 2
       AND e.oprtnl_flag = 'A'
       AND e.status_cid = 2
       AND (c.from_date) =
              (SELECT MAX (c1.from_date)
                 FROM tax_entity_detail c1
                WHERE c1.tax_entity_sid = c.tax_entity_sid
                  AND c1.oprtnl_flag = 'A'
                  AND c1.status_cid = 2)
       AND (e.from_date) =
              (SELECT MAX (c1.from_date)
                 FROM provider_detail c1
                WHERE c1.prvdr_sid = e.prvdr_sid
                  AND c1.oprtnl_flag = 'A'
                  AND c1.status_cid = 2)
       AND pld.oprtnl_flag = 'A'
       AND pld.status_cid = 2
       AND (pld.from_date) =
              (SELECT MAX (a1.from_date)
                 FROM provider_location_detail a1
                WHERE a1.prvdr_lctn_iid = pld.prvdr_lctn_iid
                  AND a1.oprtnl_flag = 'A'
                  AND a1.status_cid = 2)thanks
    Edited by: new learner on May 24, 2010 7:53 AM
    Edited by: new learner on May 24, 2010 10:50 AM

    May be like this not tested...
    select *
    from
    SELECT c.tax_idntfctn_nmbr irs_number, c.legal_name irs_name,
    f.prvdr_lctn_iid, c.from_date as c_from_date, max(c.from_date) over(partition by c.tax_entity_sid) as max_c_from_date,
    e.from_date as e_from_date, max(e.from_date) over(partition by e.prvdr_sid) as max_e_from_date,
    pld.from_date as pld_from_date, max(pld.from_date) over(partition by pld.prvdr_lctn_iid) as max_pld_from_date
    FROM tax_entity_detail c,
    provider_detail e,
    provider_location f,
    provider_location_detail pld
    WHERE c.tax_entity_sid = e.tax_entity_sid
    AND e.prvdr_sid = f.prvdr_sid
    AND pld.prvdr_lctn_iid = f.prvdr_lctn_iid
    AND c.oprtnl_flag = 'A'
    AND c.status_cid = 2
    AND e.oprtnl_flag = 'A'
    AND e.status_cid = 2
    AND pld.oprtnl_flag = 'A'
    AND pld.status_cid = 2
    )X
    where c_from_date=max_c_from_date AND e_from_date =max_e_from_date AND
    pld_from_date=max_pld_from_date

  • How the achive this using the function module SO_NEW_DOCUMENT_SEND_API1

    I want to format the body of the mail like this.How to maintian proper spacing between the fields.kindly suggest.
    It may contain multiple line items also.
    SC Number                               | SC Item Number                         | SC Item Qty      | PO Number       | PO Item Price
    SC Name                                  | SC Item Text                               | SC Item Price  | PO Item             | Invoice Item Price
    <SC_NUMBER>                           <SC_ITEM>                                  <SC_QTY>          <PO_NUMBER> <PO_PRICE> 
    <SC_NAME>                               <SC_ITEM_TEXT>                         <SC_PR>            <PO_ITEM>         <IV_PRICE>

    Hi,
    You can do with SOFM method select over there Excel Sheet as same format you can select all fields respectively so in the output in an attachment you will get the values as you like that format in the same way multiple line items also you can retrive data in Excel sheet attachement, then using this FM you can send mail with this attachement.
    Thanks and regards,
    Prabhakar Dharmala

  • How to achive this report.

    Hi,
    Scenario : Some raw materials qty are moving to a series of various machines in work in poress .Here some of materials are rejected Qty by machines and let say xyz reason.
    In OBI,If i pull all required columns into report all columns are pulling correct information expect machines.
    Machine column diplaying all used machines name.. but my requirement is only rejected machines and rejected qty for particular machine should be display in report.
    How to achive this.Kindly let me . Thank you.

    867932 wrote:
    Hi,
    Scenario : Some raw materials qty are moving to a series of various machines in work in poress .Here some of materials are rejected Qty by machines and let say xyz reason.
    In OBI,If i pull all required columns into report all columns are pulling correct information expect machines.
    Machine column diplaying all used machines name.. but my requirement is only rejected machines and rejected qty for particular machine should be display in report.
    How to achive this.Kindly let me . Thank you.Please take the time to explain in more detail - your post is not very precise and you dont describe your data model.
    As a guess, I would start with a filter : rejected Qty > 0 so you only get machines which have had a rejection, compared to "Machine column diplaying all used machines name".
    Hope this helps!
    Alastair

  • How to achive this in a single iview

    How can i create this iview/How to achive this.
    In Portal I created a Role and 2 different worksets under the role to publish BW Reports (Grouped according to the worksets)
    My requirment is when user Logins into his portal account and clicks the BW Reports Tab (Role) First screen he has to see
    Currently it is my Workset1 of which are assigned to role
    My requirment is to show them
    The screen should be divided into 2 halfs(Columns) and the Left hands side column should display our INTRANET HOME PAGE and Other hald should display a BW Report developed on Daily data Loads in Graphical Version (Web Templete is already developed)
    Please update me how to achive this
    Thanks

    Hi Thruna,
    Thanks for the update....
    few Queries
    Create a page with 2 column layout.
    Is it possible for me to create a page with 2 Columns and the Right hand column is divided in to parts
    Open the page in edit mode and select Intranet Home Page iview, right click then select "Add iview to the page" with Delta.
    If i Right click the iview and select assign to page...how can i make a setting to display that iview(Intranet Home page) on Left Hand side
    Thanks in advance

  • Hi out there. To capture a screen shot one uses: Command-Shift-3 or 4. I have done this for a long time. Now suddenly neither screen shot works anymore. Suggestions how to get this useful function back? Thanks, Georgx

    Hi out there. To capture a screen shot one uses: Command-Shift-3 or 4. I have done this for a long time. Now suddenly neither screen shot command works anymore. Suggestions how to get this useful function back? Thanks, Georgx

    Command-Shift-3 and 4 works just fine on several Macs that I have here.
    Try restarting your Mac....or post in the specific support area for your Mac model....for more advice.
    https://discussions.apple.com/index.jspa

  • How to achive this scenario

    Hi,
    We have report which contains many Financial products in product column.Some of product need to calculate by based on end user selection in terms of % in dashboard prompts.
    Example: If end user select or enter 10 in prompt then only Loan items has to calculate and need produce new row as Loan commitment 10%.
    I try by using calculated items but it not allowing to use presentation variable.How achive this.kindly let me know.
    EX:Base Report                                
    Financial Product
    Amount
    Credit Cards
    1300
    Deposit
    3000
    Shareholders' Fund
    2500
    Loans
    1000
    Expected Report:
    Financial Product
    Amount
    Credit Cards
    1300
    Deposit
    3000
    Shareholders' Fund
    2500
    Loans
    1000
    Loan commitment 10 %
    10

    I got answer for this question
    Thanks

  • How to achieve this using UWL

    Hi Friends,
    I have the following requirement for Travel request workflow and Invoice approval workflow. Please let me know how to achieve this.
    While sending a work item to sap inbox we will put the base BO in the task container right so that the approver can open the particular transaction.I need the same functionality in UWL but instead of the BO i need to place some link so that the user can open an iview or webdynpro application. Basically the user dont want to login to SAP GUI he needs everything to be done in Portal itself.
    Do we need to do some settings in tcode SWFVISU for this or do we need to change the associated xml file in UWL to provide the link to iview. Please advice.

    Hi,
    If i understand your requirement correctly, you want to place a link of BO in UWL but don't want that to get to SAP GUI. Right ?
    I think it's possible. We had ECC 6.0 and EP 6.0 with SP 11. And, we had the requirement of showing up the TRIP BO in UWL thru' an iVIEW. We tried the SWFVISU and it didn't work. But, i think this facility has been taken care in later service packs. Pl approach SAP and they should be able to help you out. I'm not sure about the details of the solution SAP provided us, but it worked for us..like there will be a button "Display XXXXXX" which infact opens up your BO in UWL without logging into GUI.
    Hope this helps.
    venu

  • How to Validate this using Regular Expressions

    Hi All,
    I have following types of Mail IDs, Each is a String.
    It may be either of the Following:
    [email protected]
    or
    Ameer<[email protected]>
    Then How to validate using the Regular Expressions.

    use this regex.. might need to convert it from perl regex flavor:
    (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
    )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:
    \r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(
    ?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[
    \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\0
    31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\
    ](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+
    (?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:
    (?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z
    |(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)
    ?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\
    r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[
    \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)
    ?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t]
    )*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*
    )(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
    )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)
    *:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+
    |\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r
    \n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:
    \r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t
    ]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031
    ]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](
    ?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?
    :(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?
    :\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?
    :(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?
    [ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\]
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|
    \\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>
    @,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"
    (?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t]
    )*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
    ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?
    :[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[
    \]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-
    \031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(
    ?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;
    :\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([
    ^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\"
    .\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\
    ]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\
    [\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\
    r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\]
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]
    |\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \0
    00-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\
    .|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,
    ;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?
    :[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*
    (?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".
    \[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[
    ^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]
    ]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)(?:,\s*(
    ?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
    ".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(
    ?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[
    \["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t
    ])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t
    ])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?
    :\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|
    \Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:
    [^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\
    ]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)
    ?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["
    ()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)
    ?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>
    @,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[
    \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,
    ;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t]
    )*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
    ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?
    (?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".
    \[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:
    \r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[
    "()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])
    *))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])
    +|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\
    .(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z
    |(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(
    ?:\r\n)?[ \t])*))*)?;\s*)

  • How to format this using Jackson JSON?

    This is the desired output
    {"node":{"type":"community","field_incentives":{"und":[{"value":"fun"},{"value":"nice"}]},"field_email":{"und":[{"value":"[email protected]"}]}}}
    Here's my code.
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    JsonFactory f = new JsonFactory();
    JsonGenerator g = f.createJsonGenerator(outputStream);
    g.writeStartObject();
    g.writeObjectFieldStart("node");
    g.writeStringField("type", "community");
    g.writeObjectFieldStart("field_incentives");
    g.writeFieldName("und");
    g.writeStartArray();
    ???I don't know how to make [{"value":"fun"},{"value":"nice"}]
    g.writeEndArray();
    g.writeObjectFieldStart("field_email");
    g.writeFieldName("und");
    g.writeStartArray();
    g.writeEndArray();
    g.writeEndObject();
    g.close();
    Here's the output
    {"node":{"type":"community","title","field_incentives":{"und":[],"field_email":{"und":[]}}}}
    Thanks

    FAT should still be supported. You may have to erase the partition or disk.
    This is the list of supported filesystems type.
    diskutil listfilesystems
    Formattable file systems
    These file system personalities can be used for erasing and partitioning.
    When specifying a personality as a parameter to a verb, case is not considered.
    Certain common aliases (also case-insensitive) are listed below as well.
    PERSONALITY                     USER VISIBLE NAME                              
    ExFAT                           ExFAT                                          
    Free Space                      Free Space                                     
      (or) free
    MS-DOS                          MS-DOS (FAT)                                   
    MS-DOS FAT12                    MS-DOS (FAT12)                                 
    MS-DOS FAT16                    MS-DOS (FAT16)                                 
    MS-DOS FAT32                    MS-DOS (FAT32)                                 
      (or) fat32
    HFS+                            Mac OS Extended                                
    Case-sensitive HFS+             Mac OS Extended (Case-sensitive)               
      (or) hfsx
    Case-sensitive Journaled HFS+   Mac OS Extended (Case-sensitive, Journaled)    
      (or) jhfsx
    Journaled HFS+                  Mac OS Extended (Journaled)                    
      (or) jhfs+

  • How to achive this in Oracle SQL

    Hi All,
    How to get the below result:
    base table:
    COLA COLB
    112 01-JAN-2012
    113 02-FEB-2012
    114 02-MAR-2013
    115 01-APR-2013
    Result table:
    COLA COLB COLC
    112 01-JAN-2012 01-FEB-2012
    113 02-FEB-2012 01-MAR-2012
    114 02-MAR-2013 31-MAR-2013
    Thanks!

    user505326 wrote:
    Hi All,
    How to get the below result:
    base table:
    COLA COLB
    112 01-JAN-2012
    113 02-FEB-2012
    114 02-MAR-2013
    115 01-APR-2013
    Result table:
    COLA COLB COLC
    112 01-JAN-2012 01-FEB-2012
    113 02-FEB-2012 01-MAR-2012
    114 02-MAR-2013 31-MAR-2013
    Wrong Forum !!! Post at {forum:id=75}. Before posting there close this thread marking as answered.

  • How to code this using FIELD SYMBOL ?

    Hello All,
    I never used field symbols before and I think this is where I should use field symbols in my program.
    I have a selection parameter period (p_period) and based on the p_period value(XX), I need to display the HSLXX, KSLXX from table GLT0 using field symbols. Can anyboby help me?
    Thanks,
    Chandni Reddy

    Right, you can use field-symbols,  here is a example.
    report zrich_0002.
    data: xGLT0  type  GLT0 .
    data: field_name(20) type c.
    field-symbols: <fs> .
    parameters: p_per(2) type n.
    * Read a line from table
    select Single * from glt0 into xglt0.
    * Build the field name that you want to access
    concatenate 'XGLT0-HSL' p_per into field_name.
    * Assign it
    assign (field_name) to <fs>.
    * Write it
    write:/ <fs>.
    Regards,
    Rich Heilman

  • How i achive this data by writing exact query ?

    Dear Exparts,
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    "CORE     10.2.0.3.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - ProductionI have a table Name TB and Column A and B with the following data.
    A       B
    10     02-AUG-2012
    10     04-AUG-2012
    10     01-SEP-2012
    10     10-AUG-2012
    11     04-AUG-2012
    11     01-SEP-2012
    11     01-AUG-2012
    10     12-AUG-2012
    10     15-JUL-2012I need data like
    A                      B
    10            10-AUG-2012
    10            12-AUG-2012
    10            01-SEP-2012
    11            01-SEP-2012How we get this data ?
    We have to count column B group by Column A. then devided the count_value by 2 and trunc it and base on the result out put will come. the data are the maximum data.
    Like when we count group A result will be
    A            B
    10           3
    11           1base on above result my desire outpul will come...
    Here is the script
    CREATE TABLE TB
        "A" VARCHAR2(20 BYTE),
        "B" DATE
    Insert into TB (A,B) values ('10',to_date('02-AUG-2012','DD-MON-RRRR'));
    Insert into TB (A,B) values ('10',to_date('04-AUG-2012','DD-MON-RRRR'));
    Insert into TB (A,B) values ('10',to_date('01-SEP-2012','DD-MON-RRRR'));
    Insert into TB (A,B) values ('10',to_date('10-AUG-2012','DD-MON-RRRR'));
    Insert into TB (A,B) values ('11',to_date('04-AUG-2012','DD-MON-RRRR'));
    Insert into TB (A,B) values ('11',to_date('01-SEP-2012','DD-MON-RRRR'));
    Insert into TB (A,B) values ('11',to_date('01-AUG-2012','DD-MON-RRRR'));
    Insert into TB (A,B) values ('10',to_date('12-AUG-2012','DD-MON-RRRR'));
    Insert into TB (A,B) values ('10',to_date('15-JUL-2012','DD-MON-RRRR'));Thanks in advance...
    Ask2Learn
    Edited by: Asked to Learn on Sep 1, 2012 7:55 AM
    Edited by: Asked to Learn on Sep 1, 2012 8:38 AM (CHANGE DATA TYPE) SORRY

    this ?
    with t as
    select a,b,round(count(*) over(partition by a)/2) cnt,row_number() over(order by null) rn from tb
    ),t1 as
    select a.*,row_number() over(order by null) rn from tb a
    select t1.a,t1.b from t,t1 where t1.rn=t.rn and  t1.b>t.cnt order by a;
    A                    B                     
    10                   4                     
    10                   6                     
    10                   5                     
    11                   3                     
    4 rows selected
    Or
    with t as
    select a,b,round(count(*) over(partition by a)/2) cnt from tb
    select a,b from t where cnt<b;

  • How to check whether the browser supports cookie using servlet

    Hi
    I have a servlet that uses session.I want to check whether the browser supports cookie.
    Please help me how can i detect this using servlet.
    could you please include a sample code
    thanks
    sabu

    You can check whether any cookies were sent in the request to your servlet:
    Cookie cookies[] = request.getCookies();
    if cookies is not null (cookies != null) then the browser sending you the request suppoerts cookies.
    If it is null then you would need to do a little extra work. Basically add a cookie to the response going back to the browser. Then send a redirect back to this same servlet. You then would have to add code to check to see whether the cookie was sent back.
    // Servlet named myServlet
    String test = request.getParameter("TEST");
    Cookie cookies[] = request.getCookies();
    if (test == null || !test.equals("TRUE")
    if (cookies == null)
    response.addCookie("testCookies","testCookies");
    response.sendRedirect("myServlet?TEST=TRUE");
    else
    // cookies were sent in the initial request, so
    // browser supports cookies
    else
    // This is the redirect. Check the for the presence of
    // our testCookie
    Hope this helps.

  • How to achive current date in report

    Hi Expeorts,
    I have below Filter in one of report. how to achive this?
    Ship Date = Current Date
    What is the meaning of this? and how to do this?
    Thanks in advance
    David
    Edited by: david Rathod on Jan 10, 2012 7:50 AM

    Hi ,
    You can achieve the same using Customer exit variable .You can use the following code .
    FORM do_user_exit       USING    i_vnam        LIKE rszglobv-vnam
                                     i_vartyp      LIKE rszglobv-vartyp
                                     i_iobjnm      LIKE rszglobv-iobjnm
                                     i_s_cob_pro   LIKE rsd_s_cob_pro
                                     i_s_rkb1d     LIKE rsr_s_rkb1d
                                     i_periv       TYPE rro01_s_rkb1f-periv
                                     i_t_var_range TYPE rrs0_t_var_range
                                     i_step        TYPE i
                            CHANGING e_t_range     TYPE rsr_t_rangesid.
      if i_step = 1.
         clear l_s_range.
         l_s_range-low = sy-datum.
         l_s_range-sign = 'I'.
         l_s_range-opt  = 'EQ'.
         append l_s_range TO e_t_range.
      endif.
    ENDFORM.   
    Hope it helps .
    Thanks
    Kamal

Maybe you are looking for

  • How do i install my scanner without a disc

    I purchased a new computer without a cd element. How do I install my scanner from my HP printer?

  • Where are the desktop & screensaver files stored?

    One of my apples is running Mac OS 10.5.8. In its choice of desktop scene from "Nature", there is a beautiful "Golden Palace." I like the picture very much and want to use it for other Apple computer, which do not have the picture. Where can I locate

  • Freehand MX

    i am posting here as i can't find anywhere in Adobew website to answer this question! I have  used Freehand since 2008; however it will no longer open - i am being asked  for a serial number; i don't have this and the company i worked for when freeha

  • File and Password

    Hi, Can i read from a remote Directory in a LAN network if it is protected by password? I need open this Directory as a File Object and not as URL Object. How I settings username and password to open this Directory? Thank you Alessandro

  • Iis7 and cf8

    Hi, I configured iis7 and cf8. The question is that, do i put my application under inetpub or under coldfusion 8 directory? Weird things happening when i put it on both locations. Sometimes changes dont effect etc. Thank you, Syed