How to remove only one row from the database using labview6.1

using labview 6.1 I create a table with various rows and columns and store bulk of data's in them.,, what procedure should I follow to remove only one paticular row from the database? Help me out with an example please,,
Thanking you in advance!

Hi,
If you have the database toolkit you can delete a row using just a SQL Query to "DB Tools Execute Query.VI"
Example:
DELETE FROM Table name Where SerialNum='Value' And Date='Value' And Time='Value'
See also attached VI
Best Regards
Johan
Attachments:
Delete_a_row_in_a_database_table.vi ‏48 KB

Similar Messages

  • Getting error while deleting rows from the database using the View Object

    Hi All,
    I am using jdev 11.1.1.4.0. I am removing the rows from the database using viewobject( quering the viewobject to find the records i want to delete).
    I am using vo.removeCurrentRow(0). Before this statement I am able to get the rows I want to delete.
    after that i am doing am.transaction.commit(). But I am getting the error..
    javax.faces.el.EvaluationException: oracle.jbo.DMLException: JBO-26080: Error while selecting entity for CriteriaEO
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: oracle.jbo.DMLException: JBO-26080: Error while selecting entity for CriteriaEO
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1117)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:553)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8134)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5863)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6369)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6551)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3275)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3078)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2088)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2369)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         ... 53 more
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00972: identifier is too long
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:924)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1261)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1419)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:869)
    Please give suggestions...
    Thanks
    Kanika

    Hi,
    First Run Application module and confirm whether model project is OK,Cause for the Error is Caused by: java.sql.SQLSyntaxErrorException: ORA-00972: identifier is too long
    check:
    Issues with table/column name length
    identifier is too long
    I guess following error occurred because above issue
    JBO-26080: DMLException
    Cause: An unexpected exception occurred while executing the SQL to fetch data for an entity instance or lock it.
    Action: Fix the cause for the SQLException in the details of this exception.
    See:
    http://download.oracle.com/docs/cd/A97337_01/ias102_otn/buslog.102/bc4j/jboerrormessages.html#26080Hope you will helpful

  • Selecting a one row from the database is not working

    Hi all I am having a small problem with getting a row from my database to show up. Here is the code for the search that I want to do
                            String item; String columnName; String result; columnName = (String)searchBox.getSelectedItem(); item = searchField.getText().trim(); String tableName = "employee"; if(item == null || item.equals("")){ System.out.println("No Text entered"); }else{ try { result = sql.retrieve_From_Database(columnName, tableName, item); System.out.println(result); } catch (SQLException e1) { sql.displayErrors(e1); }
    Here is the code for the retrieve_From_Database function.
    protected String retrieve_From_Database(String columnName, String tableName, String item) throws SQLException{ ResultSet rs = null; Statement sm = null; sm = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); rs = sm.executeQuery("select * from " + tableName + " where " + columnName + " = " + item); result = rs.getString(columnName); if(result == null){ System.out.println("Error in retrieve"); return new String("No results in DB"); }else{ System.out.println(result); return result; } }
    When I run the first code I get an error of SQL Exception: Unknown column 'anthony' in 'where clause'. But yet when I run the query of
    Select * from employee where FirstName = 'anthony'
    within the mysql commandline I get the proper result. So my question is why when running this in the command line do I get the proper result but when running the code I do not?

    jo**** wrote:
    Hi. The problem is clear in the original post. The OP is trying to use PreparedStatement
    parameters to fill out general portions of the SQL query, instead of only data values.
    He is hoping to put in a column name. That will never work. Only data values are settable.
    HTH,
    Joe WeinsteinActually, no. There's no PreparedStatement there at all. It appears that his problem is that, while the working query entered directly in the client is
    Select * from employee where FirstName = 'anthony'the query he's constructing in his code is
    Select * from employee where FirstName = anthonySince there are no quotes around anthony, it's treated as a column name.
    If he had properly used PreparedStatment as suggested in reply 1, that would not be an issue. My guess, however, is that when he claims he's using PS, it's as Tolls suggested a couple of posts ago--he's simply replacing the Statement with a PreparedStatement, but not using the parameters as suggested.
    The wrong thing for OP to do at this point is see my above comment about the quotes and explicitly add them in the query string. The right thing to do, of course, is to actually use PS's parameters.
    Edited by: jverd on Oct 11, 2010 10:08 AM

  • How to get first 10 records from the database using JSP

    i want ot get first 10 records from the database and then after clicking the next button in the page,it must show the next precceding 10 records from the database.i am getting the first 10 records .but how to post to the same page to get another preceeding 10 record.

    Search the forums - this has been asked a lot. I usually recommend experimenting with tops and order bys until you're satisfied.
    Kind regards,
      Levi

  • Pick only one row from the repeated rows

    Oracle 10g r2 (10.2.0.5)
    I have a query/view, which returns the the reords as follows
    set colsep ||
    Name     ||     Address     ||        Zip
    abc123     || Ln1     || 123456
    bcd123     || Ln2     || NULL
    bcd123     || Null     || 45678
    efg123     || Ln0     || 96345
    efg123     || Ln0123     || Null
    efg123     || adr     || null
    the result set I need from the above is
    set colsep ||
    Name     ||     Address     ||        Zip
    abc123     || Ln1     || 123456
    bcd123     || Ln2     || NULL
    efg123     || Ln0     || 96345
    As you see that the first record on each repeated row sets are required
    Thanks,

    Hi,
    Using the aggregate FIRST (or LAST) function like that, there's no guarantee that all of the output values on the same row will come from the same row in the original table. To do that, you can use the analytic ROW_NUMBER function, like this:
    WITH     got_r_num     AS
         SELECT     name, address, zip, ...
         ,     ROW_NUMBER () OVER ( PARTITION BY  name
                                   ORDER BY          address
                             ,                zip
                           )      AS r_num
         FROM     table_x
    SELECT     name, address, zip, ...
    FROM     got_r_num
    WHERE     r_num     = 1
    ;This assumes the "first" row is the one with the first address (in alphabetic order), and, in the event of a tie, the one with the lowest zip (however "lowest" is defined for zip). You can specify any order you want in the analytic ORDER BY clause.
    I hope that answers your question.
    If not, what is your question? Use words other than those you've already used to describe what you want to do.
    Explain exactly what "first" means in this problem.Point out where the query above (or the one posted by Claytonian, if that seems closer) is getting the wrong results, and explain how you'd get the right results in those places.
    If necessary, post new sample data (either CREATE TABLE and INSERT statements, or a WITH clause, as Claytonian did) and the results you want from that data.

  • How do I remove a row from the database?

    Guys and Gals,
    I'm using Studio Edition Version 11.1.1.3.0.
    The code below will delete a row from my table, but how do I actually delete the row from the database as well?
        DCBindingContainer dcbc = (DCBindingContainer)getBindings();
        DCIteratorBinding dcib = dcbc.findIteratorBinding("TipsSelectorIterator");
        dcib.removeCurrentRow();
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
        AdfFacesContext adffacesctx = AdfFacesContext.getCurrentInstance();
        adffacesctx.addPartialTarget(this.getQueryTable()); In this post, I believe Frank sums up what I should do: Remove row from af:table
    >
    The problem in your case is that this removes the row from the iterator but not your business service. EJB exposes explicit methods to remove an entity. A method lime removeEmployees(employee) >expsed on the EJB model must be called.
    You can drag and drop the "removeEmployees" method then as a button to your page. Rename the text label to "Remove" or "Delete". In the opened dialog box, point the method argument to the >following EL #{bindings.iteratorName.currentRow.dataProvider}. Next time you press the button, the row is deleted from the iterator and the business service
    Huh? So to delete the row, I need to expose a method. But where? Do I do this in the AppModuleImpl so I can expose it to the Client Interface? But then how do I access entities? And what data type is the #{bindings.iteratorName.currentRow.dataProvider}?
    If anyone could point me in a general direction, it'd be great.

    Frank and Shay,
    Thank you both for your posts. I'm amazed there's such a great place to get help. Between the forums, ADF code corner, Not Yet Documented ADF Samples, various blogs and tutorials, it's obvious you guys really care about what you do.
    On my example, that approach doesn't seem to work. I tried following it like so in one of the video tutorials by Shay: http://blogs.oracle.com/shay/2010/04/doing_two_declarative_operatio.html. Following Shay's approach, in my particular case, deletes only from the table. Perhaps it is due to my iterator / collection setup?
    TipsSelector (1 to 1) -> TipsView (1 to *)-> DependentBom -(1 to * Recursive)> RecursiveBom
    TipsSelector references the same View Object as TipsView, but it is set as a 1 to 1 relationship so that I can show TipsView on the page one record at a time. This is the same setup as Tuhra2's hierarchy veiwer example. TipsView / DependentBom is a classic parent / child setup. RecursiveBom is DependentBom referencing itself. Think of it as departments within departments within departments etc...
    I have dragged TipsSelector's Named Criteria (All Queriable Attributes) onto my page and created an ADF Query with Table. A remove button on the table's toolbar calls the two actions, Delete (from TipsSelector's iterator) and then Commit. I have modified the code slightly from my previous post but the end result seems to be the same.
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = bindings.getOperationBinding("Delete");
        operationBinding.execute();
        bindings = getBindings();
        operationBinding = bindings.getOperationBinding("Commit");
        operationBinding.execute();
        AdfFacesContext adffacesctx = AdfFacesContext.getCurrentInstance();
        adffacesctx.addPartialTarget(this.getQueryTable());Page Def file
        <action id="Commit" InstanceName="AppModuleDataControl"
                DataControl="AppModuleDataControl" RequiresUpdateModel="true"
                Action="commitTransaction"/>
        <action IterBinding="TipsSelectorIterator" id="Delete"
                InstanceName="AppModuleDataControl.TipsSelector"
                DataControl="AppModuleDataControl" RequiresUpdateModel="false"
                Action="removeCurrentRow"/>On ppr of the query table, the row is gone. However, when I press the Search button on the query again, the record reappears.
    This is beyond me. Am I somehow deleting from the query results but not the database?

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • How to bring the more than one rows from the table into the script

    Hi
    I have to bring more than one rows from the table into the Main windows of the script. so plz help me out.
    Thanks in Advance
    Ananya

    Hi Ananya,
       Bring more than one row into main window of script.
       For this you need to do some changes for data which you pass to main window.At a time you need to pass more than one row,so for this you need to define one structure.See below code.
    Types:begin of ty_rows,
         include structure (your row_structure),
         include structure (your row_sturcture),
    Types:end of ty_rows.
    for example....
    If i need to pass 2 vendor details at a time to main window then the structure should be like this.
    Types:begin of ty_rows,
           vendor1 like lfa1-lifnr,
           vendor1_name like lfa1-name1,
           vendor2 like lfa1-lifnr,
           vendor2_name like lfa1-name1,
          end of ty_rows.
    Data:i_main type standard table of ty_rows,
         wa_main type ty_rows.
    Based on condition you can pass more than one rows of your actual internal table data to i_main internal table.
    Then you can pass i_main internal table to your main window.
        I think this will help you.
    Cheers,
    Bujji

  • Condition that takes only one row with the maximum cost of the maximum date

    I have to the following query
    SELECT distinct b.segment1 ||'.'|| b.segment2 as ITEM,
           so.vendor_site_id as SUPPLIER,
           'VE' as ORIGIN_COUNTRY_ID,
           replace(round(l.mto_costo_neto/l.can_unidades_empaque,2),',','.') as UNIT_COST,
           5 as lead_time,
           null as pickup_lead_time,
           l.can_unidades_empaque as supp_pack_size,
           1 as inner_pack_size,
           'C' as round_lvl,
           50 as ROUND_TO_INNER_PCT,
           50 as ROUND_TO_CASE_PCT,
           50 as ROUND_TO_LAYER_PCT,
           50 as ROUND_TO_PALLET_PCT,
           null as MIN_ORDER_QTY,
           null as MAX_ORDER_QTY,
           'FLAT' as PACKING_METHOD,
           'N' as PRIMARY_SUPP_IND,
           'Y' as PRIMARY_COUNTRY_IND,
           case when b.primary_unit_of_measure like '%KG%' then 'KG'
                when b.primary_unit_of_measure like '%Kg%' then 'KG'
                when b.primary_unit_of_measure like '%UND%' then 'EA'
                when b.primary_unit_of_measure = 'Kilogramo' then 'KG'
                when b.primary_unit_of_measure = 'Litro' then 'L'
                when b.primary_unit_of_measure = 'Unidad' then 'EA'
                else null
           end as DEFAULT_UOP,
           1 as TI,
           1 as HI,
           null as SUPP_HIER_TYPE_1,
           null as SUPP_HIER_LVL_1,
           null as SUPP_HIER_TYPE_2,
           null as SUPP_HIER_LVL_2,
           null as SUPP_HIER_TYPE_3,
           null as SUPP_HIER_LVL_3,
           null as CREATE_DATETIME,
           null as LAST_UPDATE_DATETIME,
           null as LAST_UPDATE_ID,
           case when b.primary_unit_of_measure like '%KG%' then 'KG'
                when b.primary_unit_of_measure like '%Kg%' then 'KG'
                when b.primary_unit_of_measure like '%UND%' then 'EA'
                when b.primary_unit_of_measure = 'Kilogramo' then 'KG'
                when b.primary_unit_of_measure = 'Litro' then 'L'
                when b.primary_unit_of_measure = 'Unidad' then 'EA'
                else null
           end as COST_UOM,
           null as TOLERANCE_TYPE,
           null as MAX_TOLERANCE,
           null as MIN_TOLERANCE
    FROM mrp.mrp_sr_assignments sr , MRP.MRP_SR_RECEIPT_ORG ro , MRP.MRP_SR_SOURCE_ORG so,
         inv.mtl_system_items_b b, lcm.cmp_lineas_cotizacion l
    WHERE sr.SOURCING_RULE_ID = ro.SOURCING_RULE_ID
          and ro.SR_RECEIPT_ID = so.SR_RECEIPT_ID
          and sr.inventory_item_id in ((select inventory_item_id  from TMP.VIVERES_VEGETALES)
                                      UNION ALL
                                      (select inventory_item_id  from TMP.GENERICOS)
                                      UNION ALL
                                      (select inventory_item_id from TMP.HIJOS_GENERICOS))
          and sr.inventory_item_id = b.inventory_item_id
          and b.organization_id = 136
          and sr.inventory_item_id = l.cod_producto_idI need to agregate the following condition
    For example, The following query
    SELECT l2.fec_ini_vigencia_costo, l2.mto_costo_neto, l2.can_unidades_empaque, l2.cod_producto,
           REPLACE(ROUND(l2.mto_costo_neto/l2.can_unidades_empaque,2),',','.')  costo_unidad
    from cmp_lineas_cotizacion l2
    order by cod_producto, fec_ini_vigencia_costo desc, mto_costo_neto descgenerate
    FEC_INI_VIGENCIA_COSTO     MTO_COSTO_NETO     CAN_UNIDADES_EMPAQUE     COD_PRODUCTO      COSTO_UNIDAD
    17/06/2010     382.56     12     1.1000008     31.88 -- THIS ONE
    17/06/2010     382.56     12     1.1000008     31.88
    17/06/2010     371.0832     12     1.1000008     30.92
    17/06/2010     371.0832     12     1.1000008     30.92
    18/05/2009     382.56     12     1.1000008     31.88
    04/05/2009     245.82     12     1.1000008     20.49
    13/04/2009     382.56     12     1.1000008     31.88
    23/03/2009     373.2072     12     1.1000008     31.1
    23/03/2009     373.2072     12     1.1000008     31.1I need to take only one row with the maximum FEC_INI_VIGENCIA with the maximum COSTO_UNIDAD of the table lcm.cmp_lineas_cotizacion l, which is calculated with the formula ROUND(l2.mto_costo_neto/l2.can_unidades_empaque,2)

    A better example
    I need only one row the maximum COSTO_UNIDAD for the maximum FEC_INI_VIGENCIA for every cod_producto_id in the table lcm.cmp_lineas_cotizacion
    I need to take these values
    FEC_INI_VIGENCIA_COSTO     MTO_COSTO_NETO     CAN_UNIDADES_EMPAQUE     COD_PRODUCTO_ID  COSTO_UNIDAD
    17/06/2010     382.56     12     1.1000008     31.88 -- THIS!
    17/06/2010     382.56     12     1.1000008     31.88
    17/06/2010     371.0832     12     1.1000008     30.92
    17/06/2010     371.0832     12     1.1000008     30.92
    18/05/2009     382.56     12     1.1000008     31.88
    04/05/2009     245.82     12     1.1000008     20.49
    13/04/2009     382.56     12     1.1000008     31.88
    17/06/2010     382.56     12     1.1000008     31.88
    17/06/2010     382.56     12     1.1000008     31.88
    17/06/2010     371.0832     12     1.1000008     30.92
    17/06/2010     371.0832     12     1.1000008     30.92
    18/05/2009     382.56     12     1.1000008     31.88
    04/05/2009     245.82     12     1.1000008     20.49
    13/04/2009     382.56     12     1.1000008     31.88
    27/10/2010     1171.549344     12     1.1000009     97.63 -- THIS!
    13/10/2010     1171.549344     12     1.1000009     97.63
    06/09/2010     1171.549344     12     1.1000009     97.63
    02/08/2010     1048.825056     12     1.1000009     87.4
    28/07/2010     754.8     12     1.1000009     62.9
    27/07/2010     614.04     12     1.1000009     51.17
    21/06/2010     954.84     12     1.1000009     79.57
    27/05/2010     614.04     12     1.1000009     51.17
    07/07/2009     1143.17     12     1.1000010     95.26
    28/03/2009     1143.17     12     1.1000010     95.26
    27/10/2008     1744.644672     12     1.1000010     145.39
    01/07/2008     1690.12224     12     1.1000010     140.84
    07/07/2009     1143.17     12     1.1000010     95.26             --THIS!
    28/03/2009     1143.17     12     1.1000010     95.26
    27/10/2008     1744.644672     12     1.1000010     145.39
    01/07/2008     1690.12224     12     1.1000010     140.84
    07/07/2009     1143.17     12     1.1000010     95.26
    28/03/2009     1143.17     12     1.1000010     95.26
    27/10/2008     1744.644672     12     1.1000010     145.39
    01/07/2008     1690.12224     12     1.1000010     140.84

  • HOW TO TRANSFER ONLY ONE APPLICATION FROM AN OLD MACHINE TO A NEW ONE

    HOW TO TRANSFER ONLY ONE APPLICATION FROM AN OLD MACBOOK TO A MACBOOK PRO ?

    THERE IS AN EASY WAY TO TRANSFER SONGS & PHOTOS
    BETWEEN IPOD & IPHONE
    SIMPLY USE TRANSPOD APPLICATION ON BOTH DEVICES
    THEN
    DO IT
    (U HAVE TO BE ON THE SAME NETWORK)

  • How to remove my credit card from the App Store

    How to remove my credit card from the App Store

    I used a pre-loaded credit card so when it ran out i had problems, primarily because it wont let me download or update anything until the "billing problem with the last transaction" was resolved. I dont really care if the purchase goes through but i want to be able to update stuff again and it wont give me the option to select 'none' under payment type. do i have to put another card on there just so i can "resolve the billing problem" and then i have  to take it off again or is there a way around this or is it a never ending cycle?

  • How to fetch only WebI reports from the repository

    How to fetch only WebI reports from the repository, where in we have Deski reports also in the repository.. any macro??

    here is the query to fetch only webi reports:
    Open Administration Launchpad (.Net / Java) from:
    Start >> All Programs >> BusinessObjects XI Release 2 >> BusinessObjects Enterprise >
    Click on the 'Query Builder' under 'Administration Tools' on the left pane.
    Logon to Query Builder using Enterprise Administrator credentials.
    Run the following query for Web Intelligence Reports:
    SELECT SI_ID, SI_NAME, SI_OWNER FROM CI_INFOOBJECTS WHERE SI_KIND='WEBI'
    Thanks,
    Srikanth.

  • Any ideas on how to remove a small scratch from the screen or whether it is covered by apple?

    Any ideas on how to remove a small scratch from the screen or whether it is covered by apple?

    Call Apple Care and ask them if your computer is still under warranty. 

  • How to check my job name from the database...

    I have written one job scheduler which is as follows :
    SQL> ED
    Wrote file afiedt.buf
    1 DECLARE
    2 X NUMBER;
    3 JobNumber NUMBER;
    4 BEGIN
    5 SYS.DBMS_JOB.SUBMIT
    6 (
    7 job => X
    8 ,what => 'scott.SPLITSMS;'
    9 ,next_date => SYSDATE+1/1440
    10 ,interval => 'SYSDATE+1/1440 '
    11 ,no_parse => FALSE
    12 );
    13 JobNumber := to_char(X);
    14* END;
    15 /
    PL/SQL procedure successfully completed.
    Now I want to check whether the job has been really created or not?
    so for that I have used the following command line:
    SQL> SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS';
    SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS'
    ERROR at line 1:
    ORA-00942: table or view does not exist
    how to check my job name from the database...
    what is the command used to check the job_name ????
    and how can i ensure that my job scheduler is running properly...???
    please help ........my dear friends.....!

    957029 wrote:
    Now I want to check whether the job has been really created or not?
    so for that I have used the following command line:
    SQL> SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS';
    SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS'
    ERROR at line 1:
    ORA-00942: table or view does not existYou can use DBA_* views only if the User has been Granted a DBA Privilege.
    how to check my job name from the database...
    what is the command used to check the job_name ????You can use USER_JOBS view to check. But, is it not that you have just created the Job, so you must be knowing it?
    and how can i ensure that my job scheduler is running properly...???If USER_JOBS.FAILURES is Non Zero, that means the Job has encountered a problem that needs to be Investigated. Similarly, the LAST_DATE, LAST_SEC, NEXT_DAY, NEXT_SEC can be used to determine if the Job has been running successfully.
    if you are on 11g, you should consider using DBMS_SCHEDULER.

  • How  to retrieve one row from the number of records in a table

    i want to retrieve the rows from the number of records in a table without using the perticular column name.

    select count(*) from table
    /If you have your table currently analyzed, and no changes have been made, then you could
    select num_rows from user_tables where table_name = 'table'

Maybe you are looking for

  • ASMA in HTTP adapter

    Hello All, I'm want to use the ASMA in http adapters. I tried in file adapters and  got the expected result but in HTTP couldn't get it. In file adapter: I have selected the ASMA option in sender communication channel and selected the filename so tha

  • Windows 10 Apps won't launch

    It seems like none of my Win10 Apps want to launch and load up. I hit the icon for the app and it appears to start but it closes itself around 1s after launching. Xbox, Mail and others won't start. They were working fine until I changed some settings

  • How to Call DataGrid through xml

    Hi, I need to fill my datagrid when i click the add button. How to do it and how to call through Xml. Any idea. Regards Muthu

  • I am not able to see the installed BI content object in the DWB

    Hi , I am not able to see the installed BI content object in the DWB and the BI server is new one, this is the First BI content info object I am installing. for example I have selected 0Account BI content info object for installation I followed the b

  • Verity Search Service in JBoss

    Hi All, Good morning! Here my question is about Verity Search Service. I'm using Windows OS in my local machine and my DEV system is using Linux OS. In both these machines, Verity Search is working properly and our code works good. When we to do the