Find record in table - HELP

Hy,
I have the following situation: i have a table,(for eg. emp -id, name,...) and i want to create a form which allowes me to add,modify and delete records. That is not hard but the problem is that i do not want to see the records sequentially but i want to go to a specific record in the table(eg id=79) and modify that.
Can you help me please? This is for my thesis at university.
Thank you

hi~
1.try create 1 text item(non db item) eg. :blk01.id
2.set your db block property 'DEFAULT_WHERE' with sql
eg. ID like NVL(:blk01.id,'%')
after compile the form ,you can run form and specific
id to :blk01.id or not ,after query executed,if you
specificed id ,you can get what record you want ,else
you will get all records ..

Similar Messages

  • Find records in table that match strin

    Hello,
    I have a comma delimited string that contains zip codes. I
    need to find records in a table that match any of the zip codes in
    the string. The database table is MS SQL. What is the best method
    to do this?
    Thanks in advance for any help!

    ghanna wrote:
    > Hello,
    >
    > I have a comma delimited string that contains zip codes.
    I need to find
    > records in a table that match any of the zip codes in
    the string. The database
    > table is MS SQL. What is the best method to do this?
    >
    > Thanks in advance for any help!
    >
    cfquery
    select ...
    from ...
    where tablename.fieldname IN
    (#listqulify(yourcommadelimitedlist*)#);
    * pass it in as a variable
    OR
    where tablename.fieldname IN (<cfqueryparam
    cf_sql_type="cf_sql_clob"
    value="#yourlistvariable#" list="yes">);
    you might want ot check up on the cfqueryparam syntax - i
    have a feeling
    i didn;t get it quiet right there... :)
    Azadi Saryev
    Sabai-dee.com
    Vientiane, Laos
    http://www.sabai-dee.com

  • Need help for finding oracle payables tables

    Hi,
    I need help for finding tables relating fields INVOICE_ID, NOTIFICATION_ID and APPROVAL_STATUS or WFAPPROVAL_STATUS. I have searched a lot but has been unable to find any table containing all the above mentioned fields. I found the table WF_NOTIFICATIONS for INVOICE_ID, however have been unable to find the latest tables with INVOICE_ID and APPROVAL_STATUS as fields.
    All the tables having this combination are either very old tables which are not used anymore or doesnt give the required data. Please let me know where am i going wrong. Once i get the required tables, i need to join the tables to get the required data with the imp fields. Also, the values of WFAPPROVAL_STATUS are not very clear to me. I need values for it as APPROVED, REJECTED AND INITIATED.

    Hi Swetha,
    You will have to manually make the table adjustments in all the systems using SE14 trans since the changes done using SE14 cannot be collected in any TR.
    How to adjust tables :
    Enter the table name in SE14. For ex for any Z master data(Say ZABCD), master data table name would be /BIC/PZABCD, text table would be /BIC/TZABCD. Similarly any DSO(say ZXYZ) table name would be /BIC/AZXYZ00 etc.
    Just enter the table name in SE14 trans --> Edit --> Select the radio button "Save Data" --> Click on Activate & adjust database table.
    NOTE : Be very careful in using SE14 trans since there is possibility that the backend table could be deleted.
    How to collect the changes in TR:
    You can collect only the changes made to the IO --> When you activate, it will ask you for the TR --> Enter the correct package name & create a new TR. If it doesn't prompt you for TR, just goto Extras --> Write transport request from the IO properties Menu screen. Once these IO changes are moved successfully, then the above proceduce can be followed using SE14 trans.
    Hope it helps!
    Regards,
    Pavan

  • Reg : Find the records  in Table control

    Dear all
    Im having one requirement in table control .  In my table control totally 100 records contains sales documents
    for Example
    100010
    100020
    100030
    In that Records how to find particluar sale document in table control. How to build find option in table control.
    If possible or not
    Thanks & regards
    Sri

    Hi Sridhar,
    You need to implement amodal screen for this and a Find button above the table control.
    or you can use POPUP_GET_VALUES FM
    after you enter a value in the POP up screen.
    " You need to put some effort to implement this, wish you to implement it successfully as this is possible
    READ TABLE ITAB WITH KEY VBELN = FIND_VBELN. " FIND_VBELN is the field on your find screen.
    if sy-subrc = 0.
    tc-top_line = sy-tabix. " this makes the record visible in the First position
    endif.
    PROCESS AFTER INPUT.
      LOOP AT itab.
        MODULE find.
      ENDLOOP.
    In Program
    MODULE find INPUT.
      DATA : tab TYPE STANDARD TABLE OF sval WITH HEADER LINE.
      REFRESH tab.
      CASE ok_code.
        WHEN 'FIND'.
          clear ok_code.
          tab-tabname = 'VBAK'.
          tab-fieldname = 'VBELN'.
          APPEND tab.
          CALL FUNCTION 'POPUP_GET_VALUES'
            EXPORTING
    *   NO_VALUE_CHECK        = ' '
              popup_title           = 'Find Sales Order'
       start_column          = '5'
       start_row             = '5'
    * IMPORTING
    *   RETURNCODE            =
            TABLES
              fields                = tab
    EXCEPTIONS
       error_in_fields       = 1
       OTHERS                = 2
          IF sy-subrc = 0.
            READ TABLE itab WITH KEY vbeln = tab-value.
            IF sy-subrc = 0.
              tc-top_line = sy-tabix.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " find  INPUT
    Cheerz
    Ram

  • My i tunes don't find disc recording, can somebody help me ?

    my i tunes don't find "disc recording", can somebody help me ?

    Could you post your diagnostics for us please?
    In iTunes, go "Help > Run Diagnostics". Uncheck the boxes other than DVD/CD tests, as per the following screenshot:
    ... and click "Next".
    When you get through to the final screen:
    ... click the "Copy to Clipboard" button and paste the diagnostics into a reply here.

  • Help required in finding out the tables for FS-Claims Management module

    Hi All,
    In FS - claims Management module, i need to find out from which tables we can fetch the following fields,
    INSURED             : insured person
    DESCINSURED     : Description of insured person
    CLAIMANT     : person eligible for benefits
    DESCCLAIMANT     : Description of insured claimant
    OUTSTRES     : Outstanding reserve
    PAID             : paid amount
    INCURRED     : paid amount + outstanding reserve LOSSDESC     : loss description
    Thanks & Regards,
    Anil

    Hi Anil,
    I was searching for the fields you mentioned using SE15 and came up with lot of hits. I thought, it would be good if you do the same thing and you can find the relevant tables as might you have good idea in this area.
    I will tell you the procedure and I hope it will give you good results.
    1) Go to SE15 (Repository Info System)
    2) Click on "ABAP Dictionary"
    3) Click on "Fields"
    4) Select "Table Fields"  and enter description as "insured" on the right hand side panel with Application component as "FS"
    5) Click "Execute" (F8) and you will lot of hits.
    You need to search through it to find relevant tables for your purpose.
    Hope this will give you an idea.
    Regards,
    Vicky
    PS: Award points if helpful

  • PDE-PLI031 Unable to fetch record from table tool_modulre

    Dear ALL
    I am creating PL/SQL Libraries in report builder.
    but When I try to save the Library to database, a error
    PDE-PLI031 Unable to fetch record from table tool_modulre.
    Would you please tell me how to solve this problem
    and why it coming
    thankyou very much
    pritam singh

    Hi ,
    Saving a library (.pll) to database would store the object inside specific tables that are to be created.
    If you are using 6i, then you should find toolbild & toolgrnt.sql files which you have to run in the order specified. The above scripts creates the necessary tables and henceforth you won't get those errors while saving.
    Hope this helps.
    Thanks,
    Vinod.

  • How to insert a new record to table with foreign key

    I have 3 tables like this :
    CREATE TABLE PERSON (
    PK INTEGER NOT NULL,
    NAME VARCHAR(10),
    SSNUM INTEGER,
    MGR INTEGER);
    ALTER TABLE PERSON ADD CONSTRAINT PK_PERSON PRIMARY KEY (PK);
    ALTER TABLE PERSON ADD CONSTRAINT FK_PERSON FOREIGN KEY (MGR) REFERENCES
    PERSON (PK);
    /* Tables
    CREATE TABLE PROJECT (
    PK INTEGER NOT NULL,
    CODE_NAME INTEGER);
    ALTER TABLE PROJECT ADD CONSTRAINT PK_PROJECT PRIMARY KEY (PK);
    /* Tables
    CREATE TABLE XREF (
    PERSON INTEGER NOT NULL,
    PROJECT INTEGER NOT NULL);
    ALTER TABLE XREF ADD CONSTRAINT PK_XREF PRIMARY KEY (PERSON, PROJECT);
    ALTER TABLE XREF ADD CONSTRAINT FK_XREF1 FOREIGN KEY (PERSON) REFERENCES
    PERSON (PK);
    ALTER TABLE XREF ADD CONSTRAINT FK_XREF2 FOREIGN KEY (PROJECT) REFERENCES
    PROJECT (PK);
    I do like the way of "ReverseTutoral" and the file .jdo here :
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="reversetutorial">
    <class name="Person" objectid-class="PersonId">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="table" value="PERSON"/>
    <field name="name">
    <extension vendor-name="kodo" key="data-column"
    value="NAME"/>
    </field>
    <field name="person">
    <extension vendor-name="kodo" key="pk-data-column"
    value="MGR"/>
    </field>
    <field name="persons">
    <collection element-type="Person"/>
    <extension vendor-name="kodo" key="inverse"
    value="person"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="person"/>
    </field>
    <field name="pk" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PK"/>
    </field>
    <field name="ssnum">
    <extension vendor-name="kodo" key="data-column"
    value="SSNUM"/>
    </field>
    <field name="xrefs">
    <collection element-type="Xref"/>
    <extension vendor-name="kodo" key="inverse"
    value="person"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="person"/>
    </field>
    </class>
    <class name="Project" objectid-class="ProjectId">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="table" value="PROJECT"/>
    <field name="codeName">
    <extension vendor-name="kodo" key="data-column"
    value="CODE_NAME"/>
    </field>
    <field name="pk" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PK"/>
    </field>
    <field name="xrefs">
    <collection element-type="Xref"/>
    <extension vendor-name="kodo" key="inverse"
    value="project"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="project"/>
    </field>
    </class>
    <class name="Xref" objectid-class="XrefId">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="table" value="XREF"/>
    <field name="person">
    <extension vendor-name="kodo" key="pk-data-column"
    value="PERSON"/>
    </field>
    <field name="person2" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PERSON"/>
    </field>
    <field name="project">
    <extension vendor-name="kodo" key="pk-data-column"
    value="PROJECT"/>
    </field>
    <field name="project2" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PROJECT"/>
    </field>
    </class>
    </package>
    </jdo>
    Data of those tables are :
    PERSON :
    | PK | NAME | SSNUM | MGR |
    | 1 | ABC | 1 | 1 |
    | 2 | DEF | 5 | 1 |
    PROJECT
    | PK | CODE_NAME |
    | 1 | 12 |
    | 2 | 13 |
    And now I want to add a new record into table XREF : insert into XREF
    values (1,1);
    public void createData() {
    Xref xref = new Xref();
    Person person = new Person(1);
    Project project = new Project(1);
    xref.setPerson(person);
    xref.setProject(project);
    person.getXrefs().add(xref);
    person.getXrefs().add(xref);
    pm.currentTransaction().begin();
    pm.makePersistent(xref);
    pm.currentTransaction().commit();
    I don't know why Kodo automatically insert new record to table PERSON ->
    confilct Primary Key. The errors are :
    0 [main] INFO kodo.Runtime - Starting Kodo JDO version 2.4.1
    (kodojdo-2.4.1-20030126-1556) with capabilities: [Enterprise Edition
    Features, Standard Edition Features, Lite Edition Features, Evaluation
    License, Query Extensions, Datacache Plug-in, Statement Batching, Global
    Transactions, Developer Tools, Custom Database Dictionaries, Enterprise
    Databases, Custom ClassMappings, Custom ResultObjectProviders]
    41 [main] WARN kodo.Runtime - WARNING: Kodo JDO Evaluation expires in 29
    days. Please contact [email protected] for information on extending
    your evaluation period or purchasing a license.
    1627 [main] INFO kodo.MetaData -
    com.solarmetric.kodo.meta.JDOMetaDataParser@e28b9: parsing source:
    file:/D:/AN/Test/classes/reversetutorial/reversetutorial.jdo
    3092 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ] open:
    jdbc:firebirdsql:localhost/3050:D:/An/test/temp.gdb (sysdba)
    3325 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ]
    close:
    com.solarmetric.datasource.PoolConnection@164dbd5[[requests=0;size=0;max=70;hits=0;created=0;redundant=0;overflow=0;new=0;leaked=0;unavailable=0]]
    3335 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ] close
    connection
    3648 [main] INFO jdbc.JDBC - Using dictionary class
    "com.solarmetric.kodo.impl.jdbc.schema.dict.InterbaseDictionary" to
    connect to "Firebird" (version "__WI-V6.2.972 Firebird 1.0.3)WI-V6.2.972
    Firebird 1.0.3/tcp (annm)/P10") with JDBC driver "firebirdsql jca/jdbc
    resource adapter" (version "0.1")
    4032 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] open:
    jdbc:firebirdsql:localhost/3050:D:/An/test/temp.gdb (sysdba)
    4143 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    preparing statement <3098834>: INSERT INTO XREF(PERSON, PROJECT) VALUES
    4224 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    executing statement <3098834>: [reused=1;params={(int)1,(int)1}]
    4244 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    preparing statement <9090824>: INSERT INTO PERSON(MGR, NAME, PK, SSNUM)
    VALUES (?, ?, ?, ?)
    4315 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    executing statement <9090824>: [reused=1;params={null,null,(int)1,(int)0}]
    4598 [main] WARN jdbc.JDBC - java.sql.SQLWarning: java.sql.SQLWarning:
    resultSetType or resultSetConcurrency changed
    4598 [main] WARN jdbc.JDBC - java.sql.SQLWarning: java.sql.SQLWarning:
    resultSetType or resultSetConcurrency changed
    4598 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] begin
    rollback
    4608 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] end
    rollback 10ms
    4628 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ]
    close:
    com.solarmetric.datasource.PoolConnection@1878144[[requests=2;size=2;max=70;hits=0;created=2;redundant=0;overflow=0;new=2;leaked=0;unavailable=0]]
    4628 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] close
    connection
    javax.jdo.JDOFatalDataStoreException:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (null, null, 1, 0)]
    [PRE=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (?, ?, ?, ?)]
    GDS Exception. violation of PRIMARY or UNIQUE KEY constraint "PK_PERSON"
    on table "PERSON" [code=335544665;state=null]
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (null, null, 1, 0)]
    [PRE=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (?, ?, ?, ?)]
    GDS Exception. violation of PRIMARY or UNIQUE KEY constraint "PK_PERSON"
    on table "PERSON"
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLExceptions.java:17)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:416)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
    at reversetutorial.Finder.createData(Finder.java:74)
    at reversetutorial.Finder.main(Finder.java:141)
    NestedThrowablesStackTrace:
    org.firebirdsql.jdbc.FBSQLException: GDS Exception. violation of PRIMARY
    or UNIQUE KEY constraint "PK_PERSON" on table "PERSON"
    at
    org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(FBPreparedStatement.java:425)
    at
    org.firebirdsql.jdbc.FBPreparedStatement.executeUpdate(FBPreparedStatement.java:136)
    at
    com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:111)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:542)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:511
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:405)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:272
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:411)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
    at reversetutorial.Finder.createData(Finder.java:74)
    at reversetutorial.Finder.main(Finder.java:141)
    at org.firebirdsql.gds.GDSException: violation of PRIMARY or UNIQUE KEY
    constraint "PK_PERSON" on table "PERSON
    at org.firebirdsql.jgds.GDS_Impl.readStatusVector(GDS_Impl.java:1683)
    at org.firebirdsql.jgds.GDS_Impl.receiveResponse(GDS_Impl.java:1636)
    at org.firebirdsql.jgds.GDS_Impl.isc_dsql_execute2(GDS_Impl.java:865)
    at
    org.firebirdsql.jca.FBManagedConnection.executeStatement(FBManagedConnection.java:782)
    at
    org.firebirdsql.jdbc.FBConnection.executeStatement(FBConnection.java:1072)
    at
    org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(FBPreparedStatement.java:420)
    at
    org.firebirdsql.jdbc.FBPreparedStatement.executeUpdate(FBPreparedStatement.java:136)
    at
    com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:111)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:542)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:511)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:405)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:272)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:411)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
    at reversetutorial.Finder.createData(Finder.java:74)
    at reversetutorial.Finder.main(Finder.java:141)
    Exception in thread "main"

    First off, use the '-primaryKeyOnJoin true' flag when running the reverse
    mapping tool so that you can get rid of that useless Xref class and have
    a direct relation between Person and Project. See the documentation on
    reverse mapping tool options here:
    http://www.solarmetric.com/Software/Documentation/latest/docs/ref_guide_pc_reverse.html
    But your real problem is that you are creating new objects, assigning
    primary key values, and expecting them to represent existing objects.
    That's not the way JDO works. If you want to set relations to existing
    objects in JDO, you use the PM to look up those objects. If you try to
    create new objects, JDO will assume you want to insert new records into
    the DB, and you'll get PK conflicts like you see here.
    There are several good books out on JDO; if you're just starting out with
    it, they might save you a lot of time and help you master JDO quickly.

  • Query to find out the table name and column name..

    Hi Experts,
    I have an Oracle DB in which has more than 50 tables and 100,000 records. I want to get the record which contains *"ITxtVarValue references a non existing text"* the text.
    Is there any query there to find out the table name and column name of this particular record where it reside?
    Please help. Any help will be rewarded.
    Thanks,
    G

    Using this forum's search function, I found a thread that should give you an idea: How to find out a tablename
    C.

  • Add records in table ACCESS from labview by ActiveX

    I try to add records in table of database ACCESS by an ActiveX from labview but my programme doesn't work ...
    What is the problem ?
    I have attached my VI
    Thanks in advance
    hasna
    Attachments:
    base1.vi ‏35 KB

    On Thu, 11 Jul 2002 08:13:48 -0700 (PDT), Lab Viewer
    wrote:
    >I saw your previous posts related to ActiveX/Access. I once had the
    >same kind of problems. It's not an easy task (without a toolkit)
    >because you have to learn the "interface" provided by Access/DAO in
    >order to manage what you are trying to do.
    >In my case, the best solution it was to follow the Visual Basic for
    >Applications examples included in MS Access. Even though you don't
    >know VB, don't be afraid. Important is to figure out from that example
    >what methods/properties you need to use, the proper order to call them
    >and eventually some parameters. You are dealing with the same
    >methods/properties in LabVIEW, the difference is that you have them in
    >a graphical format instead of text
    .You can find these examples by
    >going to MS Access help > Index and type DAO objects and then choose
    >one to start with (Database, recordset, field =85).
    >
    >Hope this helps
    The examples on NI's website were originally written using the DAO
    model, but the latest one was written using the ADO model.
    However, I am unable to find either example LLBs on their website
    anymore. Maybe they're trying to push their SQL Toolkit.
    Along with the VBA help in MS Access, I *highly* recommend the book
    ADO Programming for Dummies. Wonderful book. Helped me understand the
    VBA help. :-)
    Again, if anyone is intersted in VIs using ActiveX that works. He/she
    is welcome to email me.
    Linda

  • Need to find records which match or unmatch with isd code

    Hi all,
    Having two tables
    1. cdr
    callingno                      calledno
    9891567854                 8613548159929
    9894562145                 8125642136545
    9899546213                 8336547896322
    8856521217                 8174456217789
    2. ISD rates
    code
      81
    817
    818
    819
       82
       84
    850
    852
    853
    8536
    855
      86
    Requirements:
    1] Matching records : Find records from cdr which matches isd code from isd rates table
    it cound be
    select cdr.callingno, cdr.calledno from cdr cdr, isdrates isd where (( substr(cdr.calledno,1,1) =isd.code) or ( substr(cdr.calledno,1,2) =isd.code) or ( substr(cdr.calledno,1,3) =isd.code) or
    ( substr(cdr.calledno,1,4) =isd.code))
    output:
    callingno                      calledno
    9891567854                 8613548159929
    9894562145                 8125642136545
    8856521217                 8174456217789
    2] Unmatching records:
    output required:
    callingno                      calledno
    9899546213                 8336547896322
    Kindly Help.

    this?
    with cdr(callingno,calledno) as (
    select '9891567854','8613548159929' from dual union all
    select '9894562145','8125642136545' from dual union all
    select '9899546213','8336547896322' from dual union all
    select '8856521217','8174456217789' from dual ),
    isd(code) as(
    select '81' from dual union all
    select '817' from dual union all
    select '818' from dual union all
    select '819' from dual union all
    select '82' from dual union all
    select '84' from dual union all
    select '850' from dual union all
    select '852' from dual union all
    select '853' from dual union all
    select '8536' from dual union all
    select '855' from dual union all
    select '86' from dual )
    select q.callingno,
           q.calledno,
           case when count(decode(m, 'MATCHED', 1)) > 0 then 'MATCHED' else 'UNMATCHED' end
      from (select t.callingno,
                   t.calledno,
                   case when (substr(t.calledno, 1, 4) like i.code || '%') then 'MATCHED' else 'UNMATCHED' end m
              from cdr t, isd i) q
    group by q.callingno, q.calledno
    CALLINGNO
    CALLEDNO
    CASEWHENCOUNT(DECODE(M,'MATCHE
    9899546213
    8336547896322
    UNMATCHED
    8856521217
    8174456217789
    MATCHED
    9891567854
    8613548159929
    MATCHED
    9894562145
    8125642136545
    MATCHED
    Ramin Hashimzade

  • Find record count between two time stamps

    Hi All,
    Problem: My custom table having a datetime column ;
    I want to find records processed between two time stamps.
    say: records between 2010-04-28 10:15:00 and 2010-04-28 12:30:00
    Could you please help me in this.
    Thanks in advance
    Karri

    use To_date function in where column on that Dat_col
    WHERE date_col BETWEEN TO_DATE ('2010-04-28 10:15:00',
    'mm-dd-rrrr hh24:mi:ss')
    AND TO_DATE ('2010-04-28 12:30:00',
    'mm-dd-rrrr hh24:mi:ss')

  • Add a new record to table control

    Dear all,
    How to add a new  blank record to a table control?
    Following code is not working for adding  a new blank record to a table control
    MODULE USER_COMMAND_0100 INPUT.
        SAVE_OK = OK_CODE.
        CLEAR OK_CODE.
        CASE SAVE_OK.
          WHEN 'EXIT'.
            LEAVE PROGRAM.
          WHEN 'APND'.             " A button "Add" to add a new record to table control
            REFRESH IT_KNA1.
            CLEAR IT_KNA1.
            APPEND IT_KNA1.
        ENDCASE.
    ENDMODULE.        
    Thanks you

    Hope you have done all table control specific coding
    refer this example program
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm

  • How to find out the tables from extract structures

    Hi All,
    As I know my data sources are 2lis_04_p_matnr,2lis_04_p_comp,2lis_04_p_arbpl.
    How to find out the tables concerned with the fields in the extract structure.
    Thanks

    Pl check this link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/29/79eb3cad744026e10000000a11405a/frameset.htm
    OR navigate to: help.sap.com - netweaver - bi content - supply chain - look for your application area and the extractor and you will see the source tables and fields.
    Ravi Thothadri

  • How to find names of tables created by specific user

    I have tried;
    select * from dba_tables
    and
    select * from users_tables
    and it shows 1600 + and 900+ tables resp. I just need to find out the tables created by me.
    any help or guidance is greatly appreciated.

    Hi,
    Welcome to the forum. This may help you.
    select * from dba_objects where object_type='TABLE' and owner = <user>
    select * from user_objects where object_type='TABLE'cheers
    VT

Maybe you are looking for

  • XML error when trying to run any report with add/remove programs - worked briefly after SP1 upgrade - no longer works

    I applied SP1 in hopes of fixing the reporting bug as discussed here and it did work - for a day or so. Now, I am getting the error again. Not sure what to do. Please advise. The attempt to connect to the report server failed. Check your connection i

  • What is jetpack file? and can i get rid of it?

    what is jetpack file in my profiles? can i get rid of it? could it be the reason i have problem with java windows at URL below? While playing bridge on Pogo, even in safe mode, the java window freezes or kicks me out, or pogo server loses my sign-in

  • Problems connecting two wireless rooters without cable.

    How do I set two Roter, if one is already configured. The other is a  model Edimax BR-6504n. For the first Roter I know the MAC address and  no password ... I connect with any laptop without the password, I am  interested in someone who knows better

  • SAP NetWeaver Portal or SAP Enterprise Portal 7.0 ?

    Hi, i am confused in the names, what is the differences. SAP NetWeaver Portal or SAP Enterprise Portal 7.0 ? What is final name in the Nw04s ? Visual Composer is included in the Nw04s BI or in the Portal ? Collaboration and Knowledge management insid

  • Error while starting J2EE

    Hello, i am using jsdk1.3 and j2ee 1.3 beta. after installation it works fine but sometimes when i do start the j2ee with command j2ee -verbose then i have the following error. J2EE server listen port: 1050 org.omg.CORBA.INTERNAL: minor code: 1398079