How to retrieve value from insert statement

hi,
how can i get a certain value from insert statement and store it in a variable.
suppose i am inserting emp_no , emp_name , emp_salary to employee table
and i want to store the emp_name in a variable for other processing,
how can i accomplish this ? i'm guessing that i have to use trigger,
but dont know the procedure .
any help will be greatly appreciated
thanks

insert into <table> valiues (....) returning <expression> into <variable>
You could and should have found this using the SQL Language reference manual
or
http://www.morganslibrary.org/reference/insert.html
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • How to assign value from insert statement to variable from a trigger

    Hi,
    I got this really annoying problem and I don't know if I am doing it correctly.
    I have a BEFORE INSERT trigger on a table. When someone executes an insert statement I want to grab the value of a column from that statement and assign it to a variable and then do stuff with it. I'm stuck on the assignment.. look below..
    CREATE OR REPLACE TRIGGER CARS.geotest2_trigger
    BEFORE INSERT ON CARS.GEO_TEST2
    FOR EACH ROW
    DECLARE
    v_chainkey nchar(32);
    v_chainkey2 nchar(32);
    not_exists EXCEPTION;
    BEGIN
    :NEW.CHAINKEY := v_chainkey;
    SELECT GEO_TEST.CHAINKEY INTO v_chainkey2 FROM GEO_TEST WHERE GEO_TEST.CHAINKEY = v_chainkey;
    IF v_chainkey2 = '' or v_chainkey2 is null THEN
    RAISE not_exists;
    ELSE
    INSERT INTO GEO_TEST2 VALUES(:NEW.CHAINKEY, :NEW.BLA, :NEW.FOO);
    END IF;
    EXCEPTION
    WHEN not_exists THEN
    RAISE_APPLICATION_ERROR(-20010, 'Chainkey does not exist in parent table GEO_TEST');
    END;
    I keep getting this error
    Error: ORA-04098: trigger 'CARS.GEOTEST2_TRIGGER' is invalid and failed re-validation
    SQLState: 42000
    ErrorCode: 4098

    It isn't assigning because v_chainkey is not at the left hand side of the assignment statement.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G> declare
      2    x  number := 5;
      3    y  number;
      4  begin
      5    x := y; -- does not assign anything to y; assigns NULL to x,
      6            -- because y is NULL at this point
      7            -- so, essentially the value 5 of x is *LOST* now
      8    dbms_output.put_line('x = '||x);
      9  end;
    10  /
    x =
    PL/SQL procedure successfully completed.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G>In any case, here's what you are probably looking for:
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> drop table geo_test;
    drop table geo_test
    ERROR at line 1:
    ORA-00942: table or view does not exist
    test@ORA10G> drop table geo_test2;
    drop table geo_test2
    ERROR at line 1:
    ORA-00942: table or view does not exist
    test@ORA10G>
    test@ORA10G> create table geo_test (chainkey nchar(32));
    Table created.
    test@ORA10G> insert into  geo_test (chainkey) values ('a');
    1 row created.
    test@ORA10G> insert into  geo_test (chainkey) values ('');
    1 row created.
    test@ORA10G>
    test@ORA10G> create table geo_test2 (chainkey nchar(32), bla number(1), foo number(1));
    Table created.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G> CREATE OR REPLACE TRIGGER geotest2_trigger
      2  BEFORE INSERT ON GEO_TEST2
      3  FOR EACH ROW
      4  DECLARE
      5    v_chainkey2  nchar(32);
      6    not_exists   EXCEPTION;
      7  BEGIN
      8    SELECT GEO_TEST.CHAINKEY INTO v_chainkey2 FROM GEO_TEST WHERE nvl(GEO_TEST.CHAINKEY,'~') = nvl(:new.chainkey,'~');
      9    IF v_chainkey2 is null THEN
    10      RAISE not_exists;
    11    END IF;
    12  EXCEPTION
    13    WHEN not_exists THEN
    14      RAISE_APPLICATION_ERROR(-20010, 'Chainkey does not exist in parent table GEO_TEST');
    15  END;
    16  /
    Trigger created.
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values ('b',1,1);
    insert into geo_test2 (chainkey,bla,foo) values ('b',1,1)
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "TEST.GEOTEST2_TRIGGER", line 5
    ORA-04088: error during execution of trigger 'TEST.GEOTEST2_TRIGGER'
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values (null,1,1);
    insert into geo_test2 (chainkey,bla,foo) values (null,1,1)
    ERROR at line 1:
    ORA-20010: Chainkey does not exist in parent table GEO_TEST
    ORA-06512: at "TEST.GEOTEST2_TRIGGER", line 11
    ORA-04088: error during execution of trigger 'TEST.GEOTEST2_TRIGGER'
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values ('a',1,1);
    1 row created.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G>pratz
    I think the sole purpose of that "not_exists" exception is this -
    If you try to insert a NULL value for GEO_TEST2.CHAINKEY, then this trigger will throw an error even if at least one NULL value exists in GEO_TEST.CHAINKEY column.
    Not sure if that's something that you wanted.
    Message was edited by:
    pratz

  • How to retrieve value from xml file

    hi all,
    can somebody pls tell me how to retrieve value from xml file using SAXParser.
    I want to retrieve value of only one tag and have to perform some validation with that value.
    it's urgent .
    pls help me out
    thnx in adv.
    ritu

    hi shanu,
    the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
    pls have a look at the following code snippet.
    public class XMLValidator {
    static ArrayList strXXX = new ArrayList();
    public void validate(){
    factory.setValidating(true);
    parser = factory.newSAXParser();
    //all factory code is here only
    parser.parse(xmlURI, new XMLErrorHandler());     
    public void setXXX(String pstrXXX){          
    strUpn.add(pstrXXX);
    public ArrayList getXXX(){
    return strXXX;
    class XMLErrorHandler extends DefaultHandler {
    String tagName = "";
    String tagValue = "";
    String applicationRefNo = "";
    String XXXValue ="";
    String XXXNo = "";          
    XMLValidator objXmlValidator = new XMLValidator();
    public void startElement(String uri, String name, String qName, Attributes atts) {
    tagName = qName;
    public void characters(char ch[], int start, int length) {
    if ("Reference".equals(tagName)) {
    tagValue = new String(ch, start, length).trim();
    if (tagValue.length() > 0) {
    RefNo = new String(ch, start, length);
    if ("XXX".equals(tagName)) {
    XXXValue = new String(ch, start, length).trim();
    if (XXXValue.length() > 0) {
    XXXNo = new String(ch, start, length);
    public void endElement(String uri, String localName, String qName) throws SAXException {                    
    if(qName.equalsIgnoreCase("XXX")) {     
    objXmlValidator.setXXX(XXXNo);
    thnx & Regards,
    ritu

  • How to retrieve values from the struts DAO to Struts JSP

    Hi friends,
    I have one question. i want to display values in the struts jsp file from the struts DAO class. can anyone tell how do it.
    Appreciated for your help.
    Thanks
    G1 :)

    Hi Santosh,
    Thanks for your prompt reply.
    Actually, my problem is i want to display complete rows from the DAO to JSP page. I'm displaying all the rows in the DAO from DB.
    But i dont know how to retrieve all these data from DAO. Can i take arraylist.??
    DAO:
    ------------     public Customers getData(Customers customers){ // Reading data from DB
         //ArrayList list = null ;
         try
              Connection conn = getSQLConnection();
              Statement statement = conn.createStatement();
              String qry = "select * from register";
              ResultSet resultSet = null;
              PreparedStatement pstat = conn.prepareStatement(qry);
              // pstat.setString(1, customers.getFname());
              resultSet = pstat.executeQuery();
    //Print the data to the console
    while(resultSet.next()){
              String fnam = resultSet.getString(1);
              String lnam = resultSet.getString(2);
              String gen = resultSet.getString(3);
              String addres = resultSet.getString(4);
              String cit = resultSet.getString(5);
              String zip = resultSet.getString(6);
              String county = resultSet.getString(7);
              String emal = resultSet.getString(8);
              System.out.println("First name:"+fnam);
              System.out.println("Last name:"+lnam);
              System.out.println("Address:"+addres);
              customers.setFname(fnam);
              customers.setLname(lnam);
              customers.setGender(gen);
              customers.setAddress(addres);
              customers.setCity(cit);
              customers.setZipcode(zip);
              customers.setCountry(county);
              customers.setEmail(emal);
                   statement.close();
                   conn.close();
              }catch(Exception e1){
                   e1.printStackTrace();
              return customers;
    Bean:
    I have specified in this line in Bean:
    request.getSession().setAttribute("customers", customers);
    But in JSP. how will i populate all these data. Pls..send some code.
    I'm sorry this is just practicals. i'm not doin any real time project. that;s why i have placed all these code.
    Thanks for your patience for resolving my problems.
    Thanks
    G1

  • How to retrieve value from AIAInstallProperties.xml in AIA Flow.

    After PIP Developement, Installer team will build the OUI installer for the PIP.They will build the screens for our PIP based on the requirements we give them.We give them a list of properties that we need the installer to prompt for and then the installer will store the values entered by the user in AIAInstallProperties.xml file.When the code is written, these properties are used instead of hardcoding any machine names, usernames, passwords, etc. When the services are deployed the properties are replaced with the values in AIAInstallProperties.xml.
    How to retreive those values from AIAInstallProperties.xml file to your participating applications or any adapters in your code?
    When the services are deployed how the properties are getting replaced with the values in AIAInstallProperties.xml.?
    Can anyone explain the above two flow.
    Thanks in advance.

    Hi
    Prem Edwin's posting about AIAInstallProperties.xml is correct.
    Two points, the 11gR1 is a foundation pack only release, that is why the OUI is only built to collect FP related information. In the future, when PIPs arrive, new wizard steps will involve to collect PIP specific information during installation/deployment time.
    For your example of of getting a file location during installation, it would be effectively for your self-built PIPs. That is why the 11gR1 FP OUI would not support that.
    Also, there are only finite number of tokens can be detokenized from AIAInstallProperties.xml to composite.xml, if you were introducing a random new 'file path', I don't believe it would be replaced automatically by default in R1 time.
    Thanks!

  • How to retrieve values from Dynamic Selection screen while using LDB  - PSJ

    I am having problem in PSJ Logical database. In a custom report which is using PSJ LDB, we are using PROJ and PRPS_R tables.
    When I run program it displays one dynamic selection screen, there we are giving selection criteria for PRPS (Master data WBS element) - Created on (giving some range like 2011/01/01 to 2011/01/31).
    So I want to display all WBS element which are created during the period (2011/01/01 - 2011/01/31).
    How do I retrieve the select-option low and high value of the field Created on Of WBS element if we Select data from any table based on this condition.
               Please help me.
    Thanks.

    in fact you don't have to get the values, you only need to tell to the program to take them into account :
    GET PRPS.
      CHECK SELECT-OPTIONS.

  • How to retrieve value from ComboBox inside a Jtable

    Hi everyone, I've this problem: I used the code that I founded to this link:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#combobox|http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#combobox]
    So I inserted a comboBox in my Jtable but I don't retrieve comboBox's values.
    I tried to retrieve these values in this way:
    myTable1.getModel().getValueAt(rowIndex, columnIndex).getClass();but this code produce a NullPointerException.
    thank you for helping me!!!!

    but I don't retrieve comboBox's valuesCorrect, because the combo box and its data is not part of the TableModel. The TableModel only stores the item that was selected from the combo box when the cell was edited.
    If you are getting an exception it is because you haven't set any data in your table model for the given cell.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • How to retrieve values from Referring Nodes

    Hi
    My sample XML nodes are, assume these to nodes are in a same XML file.
    <DestinationBandDefinitionList>
    <DestinationBandDefinition>
    <DestinationBandName>Group 1</DestinationBandName>
    <DestinationList>
    <Destination>
    <Name>India</Name>
    <DestinationIdentifierList type="prefix">
    <Value>91</Value>
    </DestinationIdentifierList>
    </Destination>
    <Destination>
    <Name>USA</Name>
    <DestinationIdentifierList type="prefix">
    <Value>1</Value>
    </DestinationIdentifierList>
    </Destination>
    </DestinationBandDefinition>
    </DestinationBandDefinitionList>
    <DestinationBandDefinitionList>
    <DestinationBandDefinition>
    <DestinationBandName>Group 2</DestinationBandName>
    <DestinationList>
    <Destination>
    <Name>UAE</Name>
    <DestinationIdentifierList type="prefix">
    <Value>971</Value>
    </DestinationIdentifierList>
    </Destination>
    <Destination>
    <Name>Russia</Name>
    <DestinationIdentifierList type="prefix">
    <Value>7</Value>
    </DestinationIdentifierList>
    </Destination>
    </DestinationBandDefinition>
    </DestinationBandDefinitionList>
    <TariffList>
    <DestinationBand>
    <DestinationBandName>Group 1</DestinationBandName>
    <RatingIntervalName>standard1</RatingIntervalName>
    <Rate taxIncluded="false" type="N">3.50</Rate>
    </RateSpecification>
    <RateSpecification>
    <RatingIntervalName>standard2</RatingIntervalName>
    <Rate taxIncluded="false" type="N">3.50</Rate>
    </RateSpecification>
    </RateSpecificationList>
    </DestinationBand>
    What is the statement to query the Taxincluded value of the Group, where USA belongs.
    My DB is Oracle 10g 2.0.1.0
    Thanks in advance
    Rizly

    SQL> with XML as
      2  (
      3    select XMLTYPE(
      4  '<Root>
      5     <DestinationBandDefinitionList>
      6             <DestinationBandDefinition>
      7                     <DestinationBandName>Group 1</DestinationBandName>
      8                     <DestinationList>
      9                             <Destination>
    10                                     <Name>India</Name>
    11                                     <DestinationIdentifierList type="prefix">
    12                                             <Value>91</Value>
    13                                     </DestinationIdentifierList>
    14                             </Destination>
    15                             <Destination>
    16                                     <Name>USA</Name>
    17                                     <DestinationIdentifierList type="prefix">
    18                                             <Value>1</Value>
    19                                     </DestinationIdentifierList>
    20                             </Destination>
    21                     </DestinationList>
    22             </DestinationBandDefinition>
    23     </DestinationBandDefinitionList>
    24     <DestinationBandDefinitionList>
    25             <DestinationBandDefinition>
    26                     <DestinationBandName>Group 2</DestinationBandName>
    27                     <DestinationList>
    28                             <Destination>
    29                                     <Name>UAE</Name>
    30                                     <DestinationIdentifierList type="prefix">
    31                                             <Value>971</Value>
    32                                     </DestinationIdentifierList>
    33                             </Destination>
    34                             <Destination>
    35                                     <Name>Russia</Name>
    36                                     <DestinationIdentifierList type="prefix">
    37                                             <Value>7</Value>
    38                                     </DestinationIdentifierList>
    39                             </Destination>
    40                     </DestinationList>
    41             </DestinationBandDefinition>
    42     </DestinationBandDefinitionList>
    43     <TariffList>
    44             <DestinationBand>
    45                     <DestinationBandName>Group 1</DestinationBandName>
    46                     <RatingIntervalName>standard1</RatingIntervalName>
    47                     <Rate taxIncluded="false" type="N">3.50</Rate>
    48                     <RateSpecificationList>
    49                             <RateSpecification>
    50                                     <RatingIntervalName>standard2</RatingIntervalName>
    51                                     <Rate taxIncluded="false" type="N">3.50</Rate>
    52                             </RateSpecification>
    53                     </RateSpecificationList>
    54             </DestinationBand>
    55     </TariffList>
    56  </Root>') XMLDOC
    57    from dual
    58  )
    59  select xmlquery
    60         (
    61           '$doc/Root/TariffList/DestinationBand[DestinationBandName/text() = $doc/Root/DestinationBandDefinitionList/De
    BandDefinition[DestinationList/Destination[Name="USA"]]/DestinationBandName/text()]/Rate/@taxIncluded'
    62           passing XMLDOC as "doc" returning content
    63         )
    64    from XML;
    false
    Elapsed: 00:00:00.09
    Execution Plan
    Plan hash value: 2594004460
    | Id  | Operation                            | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                     |                        |     1 |       |     2   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE                      |                        |     1 |     2 |            |       |
    |*  2 |   FILTER                             |                        |       |       |            |       |
    |   3 |    COLLECTION ITERATOR PICKLER FETCH | XMLSEQUENCEFROMXMLTYPE |       |       |            |       |
    |   4 |    NESTED LOOPS                      |                        |   667K|  2606K|   221K  (1)| 00:44:24 |
    |   5 |     COLLECTION ITERATOR PICKLER FETCH| XQSEQUENCEFROMXMLTYPE  |       |       |            |       |
    |*  6 |     COLLECTION ITERATOR PICKLER FETCH| XQSEQUENCEFROMXMLTYPE  |       |       |            |       |
    |   7 |  FAST DUAL                           |                        |     1 |       |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter( EXISTS (SELECT 0 FROM TABLE() "KOKBF$",TABLE() "KOKBF$" WHERE
                  SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/text()'),1,50),50,1,0)=SYS_XQ_UPKXML2SQL(SY
                  S_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/text()'),1,50),50,1,0)))
       6 - filter(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/text()'),1,50),50,1,0)=SYS_XQ
                  _UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/text()'),1,50),50,1,0))
    SQL>
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> set heading on
    SQL> with XML as
      2  (
      3    select XMLTYPE(
      4  '<Root>
      5     <DestinationBandDefinitionList>
      6             <DestinationBandDefinition>
      7                     <DestinationBandName>Group 1</DestinationBandName>
      8                     <DestinationList>
      9                             <Destination>
    10                                     <Name>India</Name>
    11                                     <DestinationIdentifierList type="prefix">
    12                                             <Value>91</Value>
    13                                     </DestinationIdentifierList>
    14                             </Destination>
    15                             <Destination>
    16                                     <Name>USA</Name>
    17                                     <DestinationIdentifierList type="prefix">
    18                                             <Value>1</Value>
    19                                     </DestinationIdentifierList>
    20                             </Destination>
    21                     </DestinationList>
    22             </DestinationBandDefinition>
    23     </DestinationBandDefinitionList>
    24     <DestinationBandDefinitionList>
    25             <DestinationBandDefinition>
    26                     <DestinationBandName>Group 2</DestinationBandName>
    27                     <DestinationList>
    28                             <Destination>
    29                                     <Name>UAE</Name>
    30                                     <DestinationIdentifierList type="prefix">
    31                                             <Value>971</Value>
    32                                     </DestinationIdentifierList>
    33                             </Destination>
    34                             <Destination>
    35                                     <Name>Russia</Name>
    36                                     <DestinationIdentifierList type="prefix">
    37                                             <Value>7</Value>
    38                                     </DestinationIdentifierList>
    39                             </Destination>
    40                     </DestinationList>
    41             </DestinationBandDefinition>
    42     </DestinationBandDefinitionList>
    43     <TariffList>
    44             <DestinationBand>
    45                     <DestinationBandName>Group 1</DestinationBandName>
    46                     <RatingIntervalName>standard1</RatingIntervalName>
    47                     <Rate taxIncluded="false" type="N">3.50</Rate>
    48                     <RateSpecificationList>
    49                             <RateSpecification>
    50                                     <RatingIntervalName>standard2</RatingIntervalName>
    51                                     <Rate taxIncluded="false" type="N">3.50</Rate>
    52                             </RateSpecification>
    53                     </RateSpecificationList>
    54             </DestinationBand>
    55     </TariffList>
    56  </Root>') XMLDOC
    57    from dual
    58  )
    59  select xmlquery
    60         (
    61           '$doc/Root/TariffList/DestinationBand[DestinationBandName/text() = $doc/Root/DestinationBandDefinitionList/De
    BandDefinition[DestinationList/Destination[Name="USA"]]/DestinationBandName/text()]/Rate/@taxIncluded'
    62           passing XMLDOC as "doc" returning content
    63         ) RESULT
    64    from XML;
    false
    Elapsed: 00:00:00.10
    Execution Plan
    Plan hash value: 2594004460
    | Id  | Operation                            | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                     |                        |     1 |       |     2   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE                      |                        |     1 |     2 |            |       |
    |*  2 |   FILTER                             |                        |       |       |            |       |
    |   3 |    COLLECTION ITERATOR PICKLER FETCH | XMLSEQUENCEFROMXMLTYPE |       |       |            |       |
    |   4 |    NESTED LOOPS                      |                        |   667K|  2606K|   221K  (1)| 00:44:24 |
    |   5 |     COLLECTION ITERATOR PICKLER FETCH| XQSEQUENCEFROMXMLTYPE  |       |       |            |       |
    |*  6 |     COLLECTION ITERATOR PICKLER FETCH| XQSEQUENCEFROMXMLTYPE  |       |       |            |       |
    |   7 |  FAST DUAL                           |                        |     1 |       |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter( EXISTS (SELECT 0 FROM TABLE() "KOKBF$",TABLE() "KOKBF$" WHERE
                  SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/text()'),1,50),50,1,0)=SYS_XQ_UPKXML2SQL(SY
                  S_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/text()'),1,50),50,1,0)))
       6 - filter(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/text()'),1,50),50,1,0)=SYS_XQ
                  _UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/text()'),1,50),50,1,0))
    SQL>
    SQL>
    SQL>
    SQL>
    SQL>

  • How to retrieve value from saw.bookmarURL

    Hi All,
    Im wondering how can we get the BookMark URL that is generated and stored in the variable in Presentation Services.
    "the bookmark URL is retrieved asynchronously and put into variable saw.bookmarkURL"
    as specified in the Oracle Doc http://docs.oracle.com/cd/E10383_01/doc/bip.1013/e10416/dashbdlinks.htm
    Thanks
    Kaushik

    Click on 'Create bookmark Link' using page Options and see the value.
    <script type="text/javascript">
    alert(GetPURL( ));
    alert(GetPURL(saw.bookmarkURL)); --Initially null after hitting the button there is value
    alert(window.location.href); ---> after hitting the button whole bookmark
    </script>
    Mark if useful

  • Retrieving values from Database in Excel Task Pane App

    So far,
    I created a website with a database on Azure, I then published my App to Azure. My problem is that I'm not sure how I retrieve values from the database (in SQL: SELECT * FROM EXAMPLE_TABLE WHERE date = str). If someone could provide me with sample code,
    that would be amazing! :D
    It would also be very helpful if anyone knew a method to automatically update the database using information from a xml stream on another website, once a day.
    Thank you!

    Hi,
    >> My problem is that I'm not sure how I retrieve values from the database
    You can use jquery ajax call to call your webserivce or REST API, which will query the database and return a json result.
    Sample:
    Apps for Office: Create a web service using the ASP.NET Web API
    >> It would also be very helpful if anyone knew a method to automatically update the database using information from a xml stream on another website
    For the database sync-up question, I suggest you posting them on the forums like SQL Server Forum.
    Thanks for your understanding.
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to retrieve data from domain(Value Range)  of the table

    hi
    how to retrieve data from domain(Value Range)  of the table
    thanks

    Hello,
    You can try using the FM: DOMAIN_VALUE_GET TB_DOMAINVALUES_GET.
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 24, 2009 10:08 AM

  • Retrieving values from a table

    Hi all,
    I need to retrieve values from CSKS-KOSTL for values containing the pattern entered by the user. For example, if the user enters 1, need to retrieve all the KOSTL values starting with 1. But when i write a SELECT statement mentioning where kostl in '1', it is ignoring all the values like (0000001, 00001034, 0012334, and others). Only values starting with 1 is only retrieved as this is a character field and due to conversion routine, zeroes are prefixed while storing in the database.
    Could any one let me know how to retrieve the values from the database in this situation?

    If you want to use IN operator in your where clause then you should define a range variable(R_KOSTL) which refers to CSKS=KOSTL and populate the range as below
    R_KOSTL-SIGN = 'I'.
    R_KOSTL-OPTION = 'CP'.
    R_KOSTL-LOW = '1*'.
    APPEND R_KOSTL.
    and then write your select statement as .... WHERE kostl IN r_kostl.
    The approach suggested by Amit should also work fine.
    Thanks
    Kiran

  • Retrieve values from a HTML table !!!

    Hi.
    How can i retrieve values from a HTML table using javascript ?
    I´m trying to use the command "document.getElementsByTagName" without success.
    Thanks in advance.
    Eduardo

    Hi, Deepu.
    I´m still with trouble in retrieving the value in HTML.
    In debug the C_CELL_ID seems to be correctly updated but
    when using the command "document.getElementById" the value is always "null".
    I implemented in the method DATA_CELL the code :
      if i_x = 3 and i_y = 2.
      C_CELL_ID             = 'zs'.
      C_CELL_CONTENT = 10. 
      endif.
    And in HTML :
    var ztest = document.getElementById('zs');
    alert(ztest);
    Could you help me please.
    Many regards
    Eduardo S.
    Message was edited by: Eduardo   Silberberg

  • How to get value from list item

    Hi all,
    How to get value from list item?
    I have a problem with the List Item object
    in the Oracle forms.
    How can I retrieve the selected item from
    a list ?
    I didn't find any function like 'list.GET_
    SELECTED_ITEM()'...
    thanks
    Bala

    Hello,
    You get the value as for any other Forms item:
    :value := :block.list_tem ;Francois

  • How to improve performance of insert statement

    Hi all,
    How to improve performance of insert statement
    I am inserting 1lac records into table it takes around 20 min..
    Plz help.
    Thanx In Advance.

    I tried :
    SQL> create table test as select * from dba_objects;
    Table created.
    SQL> delete from test;
    3635 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    4
    SQL> insert /*+ APPEND */ into test select * from dba_objects;
    3635 rows created.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    6
    Cheers, Bhupinder

Maybe you are looking for

  • Missing Sounds in Logic 8

    Very peculiar happenings in the world of Logic today. Sounds which were there before have stopped working, or playing different sounds. e.g. Strings play piano. I haven't mucked with anything - it sounds to me like preferences or library issues? Is t

  • Financial statement - FSE3

    Hello! We have customer specified Financial statements. The statements exist in old SAP environment 4.6C. Statements are needed in new SAP environment 6.0 ECC. Does someone know if Financial statements can be transported from the one SAP system to an

  • How do I re-install Acrobat XI Standard?

    How do I re-install Acrobat XI Standard?

  • Plan data handling profile

    Dear Gurus, There is a customzing point under Project System -> Costs -> Planned Costs -> Maintain plan data handling profile. Does anyone have any idea about: - where can it be used? - what is it used for? I was looking for any tool which makes plan

  • Question: Oracle Modules and the corresponding Admin Roles

    Hi, I would like to know what Admin module the following Oracle apps come under. For example, I know WSH (Shipping) comes under the Fulfillment Approver Admin. I would like similar information on the following modules. Here are the admin roles that w