RMAN report to a table

Hello,
is there a way to create a RMAN report for all the backups that are being done in different databases and that report should be directly writing to a sample table.
the report should contain the colums like -
DBNAME BKPTYPE DATE STATUS STARTTIME ENDTIME .. and so on..
i've tried using some v$views like V$RMAN_BACKUP_JOB_DETAILS,V$RMAN_BACKUP_JOB_DETAILS,V$BACKUP_SET_DETAILS. etc... but i need a some sql or pl/sql that should give me the complete report.
thanks,
vinay

Hi Vinay,
are you using recovery catalog then you can generate the backup report for all databases using the following query.
select
session_key, db_name,
min(r.start_time) start_rman,
min(c.checkpoint_time) start_controlfile,
min(d.checkpoint_time) start_datafile,
min(a.first_time) start_archivelog,
max(a.next_time) end_archivelog,
min(b.start_time) start_set,
max(b.completion_time)
end_set, min(p.start_time)
start_piece, max(p.completion_time) end_piece
from
rman.rc_backup_controlfile_details c
join
rman.rc_backup_datafile_details d
on c.session_key = d.session_key
join
rman.rc_backup_archivelog_details a
on c.session_key = a.session_key
join
rman.rc_backup_set_details b
on c.session_key = b.session_key
join
rman.rc_backup_piece_details p
on c.session_key = p.session_key
join
rman.rc_rman_backup_job_details r
on c.session_key = r.session_key
where
db_key =
(select db_key
from rman.rc_database
where name = 'alice1')
and
c.checkpoint_time >sysdate-14
and
d.checkpoint_time >sysdate-14
and
r.start_time >sysdate-14
and
a.first_time >sysdate-14
and
b.start_time >sysdate-14
and
p.start_time >sysdate-14
and
a.next_time >sysdate-14
and
b.completion_time >sysdate-14
and
p.completion_time >sysdate-14
group by
session_key,
db_name;
Regards,
Jey

Similar Messages

  • RMAN Report

    Hi,
    I am using ORACLE 10.2 G. I have done the following on my pc :
    ALTER TABLESPACE USERS BEGIN BACKUP;
    CREATE TABLE NOTBACKEDUP(ID INTEGER, STR VARCHAR(16)) TABLESPACE USERS;
    INSERT INTO NOTBACKEDUP VALUES(1, 'ROW 1');
    INSERT INTO NOTBACKEDUP VALUES(2,'ROW 2);
    COMMIT;
    ALTER TABLESPACE USERS END BACKUP;
    How do I view RMAN Report ? I need to print that report.
    Thanks .

    Hi,
    I have never used RMAN before, I need to print a copy of RMAN report to show that work that I provided in my question. How do I start RMAN ? and How Do I print that report ? I am still in dilema with respect to above statement.
    Take time and try to refer to the below oracle documentation
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup008.htm
    Note:- Don't be in hurry

  • Rman - "report unrecoverable" concept

    Hi
    I am readin g a book on rman (rman recipes 11g from APress).
    I m not able to understand what is the purpose of "report unrecoverable" command. Book says:
    >
    Ref: Section 8.3 - page# 229:
    You want to identify which datafiles have been affected by unrecoverable operations, since RMAN needs to back up those files as soon as possible after you perform an unrecoverable operation.
    Use the report unrecoverable command to find out which datafiles in the database have been marked unrecoverable because they’re part of an unrecoverable operation. Here’s an example showing how to use the report unrecoverable command:
    RMAN> report unrecoverable;
    Report of files that need backup due to unrecoverable operations
    File Type of Backup Required Name
    1 full /u01/app/oracle/data/prod1/example01.dbf
    RMAN>Could someone please give example of unrecoverable operation(s)? And how could rman/oracle know before hand if such an unrecoverable operation is going to be performed on certain datafile(s)?
    Thanks

    user12033597 wrote:
    Hi
    I am readin g a book on rman (rman recipes 11g from APress).
    I m not able to understand what is the purpose of "report unrecoverable" command. Book says:
    Ref: Section 8.3 - page# 229:
    You want to identify which datafiles have been affected by unrecoverable operations, since RMAN needs to back up those files as soon as possible after you perform an unrecoverable operation.
    Use the report unrecoverable command to find out which datafiles in the database have been marked unrecoverable because they’re part of an unrecoverable operation. Here’s an example showing how to use the report unrecoverable command:
    RMAN> report unrecoverable;
    Report of files that need backup due to unrecoverable operations
    File Type of Backup Required Name
    1 full /u01/app/oracle/data/prod1/example01.dbf
    RMAN> Could someone please give example of unrecoverable operation(s)? And how could rman/oracle know before hand if such an unrecoverable operation is going to be performed on certain datafile(s)?
    Thanks A datafile or tablespace are set to unrecoverable if any operation that had been performed (since the last backup taken on these datafiles) on datafile or tablespace that are unrecoverable.
    A little explanation:
    When ever a operation occurs on database i.e. any dml occurs on tables, these operation generates REDO information in redolog files. So when someone explicitly disable the logging information to redologfile(by hint no_logging), then datafile is marked as unrecoverable.
    Oracle says it unrecoverable because oracle cannot perform recovery by reading from redologfile or archivefiles if datafile crashes and need a recovery. Thats why rman warns you about such operation which could have taken place and point you to datafile which had these operation performed. The operations which are unrecoverable are:
    1) direct load/SQL load
    2) direct-path inserts result from insert or merge statement
    3) ALTER TABLE commands
    4) CREATE and ALTER INDEX commands
    5) INSERT /*+APPEND*/
    6) partition manipulation
    7) database object that has explicitly set with nologging option
    8) Oracle eBusiness Suite concurrent job execution identified in Oracle metalink note: 216211.1
    8) Oracle eBusiness Suite patches activities that involve database object manipulation
    9) SQL*loader with nologging
    So once you take the full backup of datafiles (which are affected by these operation) will clearout the Unrecoverable warning. Because now oracle has the backup of these files.
    What preventions you can take for not making datafile to Unrecoverable?
    Use force_logging
    Also see
    http://www.pythian.com/news/7401/oracle-what-is-an-unrecoverable-data-file/
    Hope this help you in understanding

  • Unrecoverable_change# and rman report unrecoverable

    I am running a test db oracle 11gR2 on windows server 2008.
    I am running oracle suggested backup strategy for my backup operation.
    So every night i run incremental backup and apply the previous incremental to image copies.
    I am confused on why when i run a query like
    select file#,name,unrecoverable_change#,unrecoverable_time from v$datafile
    i have atleast one or two datafiles whose unrecoverable_change# and unrecoverable_time value is not 0.
    Whether the operation was in nologging or not, since i have a incremental backup, why is the above value not 0??
    However when i run in rman,
    report unrecoverable;
    rman does not report anything. So whats the difference b/w rman unrecoverable and the one from v$datafile??
    can someone help me understand the correct concept of unrecoverable_change#??
    Thanks.

    Yes , this is right. At least with Oracle XE as show in following test case:
    SQL> select name, unrecoverable_change#, unrecoverable_time from v$datafile where file#=1;
    NAME
    UNRECOVERABLE_CHANGE# UNRECOVER
    C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
                        0
    SQL> select name, unrecoverable_change# UC, unrecoverable_time UT from v$datafile where file#=1;
    NAME
            UC UT
    C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
             0
    SQL> desc t;
    ERROR:
    ORA-04043: object t does not exist
    SQL> create table t(x int) nologging;
    Table created.
    SQL> insert /*+ APPEND */ into t select object_id from dba_objects;
    12616 rows created.
    SQL> commit;
    Commit complete.
    SQL> select name, unrecoverable_change# UC, unrecoverable_time UT from v$datafile where file#=1;
    NAME
            UC UT
    C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
       2004176 16-SEP-10
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    C:\>rman target /
    Recovery Manager: Release 10.2.0.1.0 - Production on Thu Sep 16 20:59:51 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    connected to target database: XE (DBID=2607125346)
    RMAN> report unrecoverable;
    using target database control file instead of recovery catalog
    Report of files that need backup due to unrecoverable operations
    File Type of Backup Required Name
    1    full or incremental     C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
    RMAN> backup incremental level 1 datafile 1;
    Starting backup at 16-SEP-10
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=25 devtype=DISK
    channel ORA_DISK_1: starting incremental level 1 datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00001 name=C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
    channel ORA_DISK_1: starting piece 1 at 16-SEP-10
    channel ORA_DISK_1: finished piece 1 at 16-SEP-10
    piece handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2010_09_16\
    O1_MF_NNND1_TAG20100916T210031_694TBHLT_.BKP tag=TAG20100916T210031 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
    channel ORA_DISK_1: starting incremental level 1 datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    including current control file in backupset
    including current SPFILE in backupset
    channel ORA_DISK_1: starting piece 1 at 16-SEP-10
    channel ORA_DISK_1: finished piece 1 at 16-SEP-10
    piece handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2010_09_16\
    O1_MF_NCSN1_TAG20100916T210031_694TC04T_.BKP tag=TAG20100916T210031 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
    Finished backup at 16-SEP-10
    RMAN> report unrecoverable;
    Report of files that need backup due to unrecoverable operations
    File Type of Backup Required Name
    RMAN>And you still have:
    C:\>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Sep 16 21:08:27 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> select name, unrecoverable_change# UC, unrecoverable_time UT from v$datafile where file#=1;
    NAME
            UC UT
    C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
       2004176 16-SEP-10Edited by: P. Forstmann on 16 sept. 2010 21:07

  • Form and report on a table - redirecting to report on submit

    Hi,
    I've created a form and a report on a table...
    in a form, one of the item is a radio group (with submit) with static list of values... I've set it up to submit as I am hiding/displaying other items based on the selection... for example, when user select the location value then only city and country fields are displayed and so on...
    my problem is that when I make a selection it saves the state and takes me back to the report... when I come back to the report then I see items (hidden/displayed based on the selection that I made before I left the form)
    any way to fix it...? please advice
    Thanks

    Hi,
    OK - we can't use a Dynamic Action but we can use Javascript to do this.
    Firstly, change the item type to an ordinary Radio button - that is, remove the Submit
    Secondly, in your page attribute's HTML Header setting, add in:
    <script type="text/javascript">
    function submitByRadioButton()
    if ($v('P1_PKITEM') != '')
      doSubmit('P1_RADIOITEM');
    </script>Replace P1_PKITEM with the page item name for the hidden primary key and P1_RADIOITEM with the page item name of the radio button.
    Then, on the radio button item, add the following in the HTML Form Element Attributes setting:
    onclick="javascript:submitByRadioButton()"Finally, create a branch that returns to the same page - make sure that the Sequence number puts it before any Unconditional branch. Set the Condition for this to "Request = Expression 1" and enter P1_RADIOITEM (or whatever the page item name is for the radio button) into the Expression 1 setting.
    Now, when the user creates a new record, the hidden P1_PKITEM value will be blank. Clicking the radio button at this time will not trigger a submit and the function checks this. For existing records, P1_PKITEM will contain a value, so the function will allow the doSubmit to run.
    Andy

  • Report using three tables on group basis

    Hi,
    I wish to know a clue for the follwing report among three tables either using join or sub-query or PL/SQL Script as per the below desired output.
    Top 10 games by uniques / by volume
    It should produce something like this:
    Game     Uniques     Volumes     Game Start     Game End     Mins on Air     
    Top 5 movies beginning with "D"     2734     7924     9/24/06 9:59 PM     9/24/06 10:41 PM     42     
    Top 5 One Hit Wonders     2355     6471     9/24/06 9:07 PM     9/24/06 9:48 PM     41     
    Things you find in The Kitchen     1336     3600     9/24/06 10:41 PM     9/24/06 10:59 PM     18     
    Twisted Title Men in Black     770     1435     9/24/06 9:53 PM     9/24/06 9:59 PM     6     
    Anagram Lance Armstrong     884     1350     9/24/06 9:48 PM     9/24/06 9:53 PM     5     
    A.Bucks Jack and Jill...     593     824     9/24/06 8:59 PM     9/24/06 9:04 PM     4     
    Missing link ANY101     649     815     9/24/06 9:04 PM     9/24/06 9:07 PM     3     
    Parameters should be startDate and endDate.
    This query can be obtained from using the following tables: Calls, Games, Events, Event_Types
    Calls have a timestamp.
    Every game has event, such as start game or end game (see Event_Types), with its timestamp
    Volumes: Number of calls received for each game between start game date and end date
    Uniques: Unique Number of calls received for each game between start game date and end date
    (distinct cli)
    Mins on air: differences between start call and end call
    Relationship:
    The ID column from games table and game_id from events table is common.
    Assume if the event type id is 2 then it starts game and if 3 then game ends. Other type is irrelevant for this query.
    The id from event_type is mentioned in another table event_types as master with description. But it is not required to establish relationship with this table. As this code ( 2 or 3) is alredy availbel with event_type_id in the events table.
    Please assume the CLI number as dummy data.
    I have provided the structure and query to generate tables and populate testing data to sort out this issue at the earliest.
    I tried to perform this query but I wish to compare the result with the script given by experts as I’m not a core developer.
    1) desc calls
    Name Null? Type
    CLI NOT NULL VARCHAR2(255)
    CALL_DATE NOT NULL TIMESTAMP(6)
    insert into values('&CLI','&call_date')
    select substr(CLI,1,10),substr(call_date,1,22) from calls
    SUBSTR(CLI SUBSTR(CALL_DATE,1,22)
    0662740929 22-SEP-06 05.22.44.123
    0662740973 22-SEP-06 05.22.47.123
    0662740956 22-SEP-06 05.22.46.123
    0662740980 22-SEP-06 05.22.47.123
    0662740936 09-MAY-06 05.22.44.123
    0762740954 22-SEP-06 05.22.45.123
    0762740936 09-MAY-06 05.22.47.123
    0762740921 22-SEP-06 05.22.44.123
    0113456789 22-SEP-06 05.47.04.082
    0987654321 22-SEP-06 06.16.29.727
    0 22-SEP-06 06.17.28.141
    SUBSTR(CLI SUBSTR(CALL_DATE,1,22)
    0123456789 09-MAY-06 06.27.51.224
    0112740929 22-SEP-06 06.28.43.398
    0123456789 09-MAY-06 06.30.10.830
    0044791475 24-SEP-06 04.38.08.564
    0044791475 24-SEP-06 04.40.05.777
    0123456789 24-SEP-06 05.32.22.267
    0147258369 24-SEP-06 05.34.25.652
    0852147963 24-SEP-06 05.52.56.992
    0123456789 25-SEP-06 01.34.17.157
    0683379112 25-SEP-06 01.35.19.461
    0 25-SEP-06 03.09.12.347
    SUBSTR(CLI SUBSTR(CALL_DATE,1,22)
    0141411683 25-SEP-06 03.21.07.402
    0141411683 25-SEP-06 03.21.38.519
    0618769562 02-JUN-06 03.22.12.807
    0123456789 02-JUN-06 03.24.11.387
    0 25-SEP-06 03.25.13.152
    0141412179 25-SEP-06 03.25.38.424
    0123456789 02-JUN-06 03.26.57.687
    0607069617 02-JUN-06 03.27.02.720
    0014141168 26-SEP-06 03.30.55.290
    0618769562 25-SEP-06 03.31.21.141
    0141411683 25-SEP-06 03.31.45.952
    SUBSTR(CLI SUBSTR(CALL_DATE,1,22)
    0607069617 25-SEP-06 03.32.14.542
    0618769562 25-SEP-06 03.32.30.433
    0 25-SEP-06 03.32.43.292
    0141412179 25-SEP-06 03.33.07.166
    0 25-SEP-06 03.33.56.086
    0 25-SEP-06 03.34.03.918
    0123456789 26-SEP-06 03.34.21.193
    0 25-SEP-06 03.34.25.484
    0 25-SEP-06 03.34.39.126
    0 25-SEP-06 03.34.40.354
    0 25-SEP-06 03.34.51.231
    2)
    SQL> desc events
    Name Null? Type
    EVENT_TYPE_ID NOT NULL NUMBER(19)
    EVENT_DATE NOT NULL TIMESTAMP(6)
    GAME_ID NUMBER(19)
    insert into events values ('&EVENT_TYPE_ID','&EVENT_DATE',&GAME_ID')
    SQL> select substr(event_type_id,1,10),substr(event_date,1,20),substr(game_id,1,10) from events where game_id in (1918,1919,1920,1939,1958,1979,1999,2018,2040,2041,2061)
    SUBSTR(EVE SUBSTR(EVENT_DATE,1, SUBSTR(GAM
    3 26-APR-06 06.11.50.8 1939
    4 26-APR-06 06.12.05.6 1939
    5 26-APR-06 06.16.13.5 1939
    3 09-MAY-06 06.18.59.7 1920
    4 09-MAY-06 06.22.43.7 1920
    3 12-MAY-06 04.24.46.2 1920
    4 12-MAY-06 04.46.22.5 1920
    3 12-MAY-06 04.29.07.4 1920
    4 12-MAY-06 04.39.31.1 1920
    3 12-MAY-06 04.29.35.3 1920
    4 12-MAY-06 04.30.02.8 1920
    SUBSTR(EVE SUBSTR(EVENT_DATE,1, SUBSTR(GAM
    3 26-SEP-06 12.19.27.6 1958
    4 26-SEP-06 12.29.37.9 1958
    5 01-JUN-06 12.26.37.2 1958
    3 02-JUN-06 11.53.49.0 1979
    6 02-JUN-06 11.54.00.5 1979
    4 02-JUN-06 11.54.55.5 1979
    3 02-JUN-06 11.55.03.7 1979
    4 02-JUN-06 11.57.40.7 1979
    3 02-JUN-06 11.57.43.5 1979
    4 02-JUN-06 11.59.47.2 1979
    3 14-SEP-06 02.24.13.8 1999
    SUBSTR(EVE SUBSTR(EVENT_DATE,1, SUBSTR(GAM
    4 14-SEP-06 02.55.18.7 1999
    3 14-SEP-06 06.44.40.1 1999
    4 14-SEP-06 06.52.57.9 1999
    3 22-SEP-06 04.05.09.5 2018
    4 22-SEP-06 05.24.14.7 2018
    5 22-SEP-06 05.24.25.0 2018
    4 24-SEP-06 03.17.54.8 2018
    3 24-SEP-06 03.19.00.1 2018
    3) INSERT INTO games VALUES ('&ID'.'&NAME')
    SQL> desc games
    Name Null? Type
    ID NOT NULL NUMBER(19)
    NAME NOT NULL VARCHAR2(255)
    select substr(id,1,10),substr(name,1,25) from games;
    SUBSTR(ID, SUBSTR(NAME,1,25)
    1918 Copy of QN27030628
    1919 Copy of Copy of QN0104061
    1920 Copy of Copy of Copy of Q
    1939 Alex Game 8
    1958 QN27030628 Lee
    1979 Copy of QN01040611 9
    1999 Ale's Game
    2018 TF1 Game test 1
    2040 Test Game TF1sarah
    2041 BTAgilemedia Game Test
    2061 Copy of Copy of QN0104060
    Your help would be highly appreciated.
    Thanks
    Jayesh

    Hi,
    I am sending herewith SQL statement for populating data into the concern tables
    To make easier for further testing your script.
    insert into calls values (0772740929, 22-SEP-06 05.22.44.123)
    insert into calls values (0882740929, 22-SEP-06 05.22.44.123)
    insert into calls values (0772740929, 25-SEP-06 05.22.44.123)
    insert into calls values (0662740929, 27-SEP-06 05.22.44.123)
    insert into calls values (0452740929, 22-SEP-06 05.22.44.123)
    insert into calls values (0992740929, 24-SEP-06 05.22.44.123)
    insert into calls values (0992740929, 26-SEP-06 05.22.44.123)
    insert into events values (3, 22-SEP-06 05.22.44.123,1918)
    insert into events values (4, 22-SEP-06 05.32.44.123,1918)
    insert into events values (3, 24-SEP-06 05.22.44,1920)
    insert into events values (4, 24-SEP-06 05.42.44,1920)
    insert into events values (3, 26-SEP-06 05.22.44,1958)
    insert into events values (4, 26-SEP-06 05.52.44,1958)
    Insert into games values (1918,’ Copy of QN27030628’)
    Insert into games values (1920,’ Test Game TF1sarah’)
    Insert into games values (1958,’ Test Car Race’)
    Thanks
    jayesh

  • For output display report is final_internal table or structure in wd ABAP?

    Hi all,
    for output display report is final_internal table or structure in wd ABAP?
    in wd java output display report -.> CALLING rfc and that RFC OUTPUT table
    finally in internal table is assigned to STRUCTURE .Same procdure?
    Thanks,
    RAMA

    Dear Madhu,
    thanks for guidence!
    its showing popup tht this BADI ( ME_CHANGE_OUTTAB_CUS ) is only use for "SAP Internal  use".
    Regards,
    Praphull

  • RMAN report need backup

    We have an incremental level-1 backup Mon-Sat and cold full backup on Sundays with retention policy of 7 days. While troubleshooting some backup issues (space issue, expired backups) I ran the following commands and trying to understand the output.
    RMAN> report need backup database;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    100 146 /orahprdidx/hprd/psindex05.dbf
    RMAN> report unrecoverable;
    Report of files that need backup due to unrecoverable operations
    File Type of Backup Required Name
    RMAN> report need backup days = 7 database;
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    100 146 /orahprdidx/hprd/psindex05.dbf
    RMAN> report obsolete recovery window of 7 days;
    no obsolete backups found
    RMAN>
    I looks like I need 146 days worth of archive log files to recover the psindex05.dbf. If so, what I could do to bring that into the 7 days policy?
    The database is fine, I am not trying to recover the database.
    This was setup by someone and now I am taking over with minimum RMAN experience.
    I appreciate any help in this subject.

    The datafile was offline. I guess it was created my mistake and hanging in there. Once I do the cleanup it should go away.

  • Report on a table from another schema

    hi,
    i have a table PROJECTS in schema CSALE when i create a report in APPEXP application (persing via user TESTER2) it gives me the error table does not found while TESTER2 has full writes on PROJECTS table.
    select project_id ID, Project_name DESC from SCALE.PROJECTS;
    when i run this query from SQL PLUS it works fine.
    I have used synonym it giving me the error
    ORA-04045: errors during recompilation/revalidation of TESTER2.PROJECTS
    ORA-00980: synonym translation is no longer valid
    Please help me how can i create a report on the table of other schema.
    Thanks

    In your schema CSALE (SCALE you stated as well)
    GRANT SELECT ON projects TO tester2In your schema TESTER2
    CREATE OR REPLACE SYNONYM projects FOR csale.projectsnow
    SELECT project_id ID, project_name description
      FROM projects;should work for you.
    Please note:
    You were using a reserved word in your query (DESC) for column alias for Project_name.
    Denes Kubicek

  • To find which reports uses the tables MKFP & MSEG

    Hi Experts,
    I have a list predeof reports. I just want to know if these reports uses the table MKFP & MSEG. Is there any predefined function or report available in order to find this one?
    Valuable answers will be rewarded.
    Thanks,
    Satish.

    user for
    MKFP  header masater document
    mseg  docu segment material
    Billing Document not released to accounting / Accounts determination:
    To resolve the error, you can analyze account determination in the billing document. Process:
    Goto T.Code: VF02 & Enter Invoice number
    Next (On the top most strip) goto Environment
    Next (Select Environment) go to Account determination
    Next (In Account Determination) select Revenue Account Determination (first option)
    This will list all the condition types in the Billing document & analyze each condition & check for which G/L accounts is not determined.
    Possible errors:
    1. VKOA not maintained for required combination
    Solution: Maintain the combination in VKOA.
    2. Account Assignment of Customer / material not maintained in Customer / Material Master (If maintained in combination in VKOA).
    Solution:
    Option 1 (Standard solution):
    step 1: Cancel Billing Document --> Reverse PGI --> cancel Delivery --> Cancel Sales Order
    step 2: Maintain Customer master / Material Master correctly.
    step 3: Recreate sales Order --> Delivery --> PGI --> Invoicing.
    Option 2:
    Force the Account Assignment Group of Customer / Material through Debug in change mode of Billing document, which will release Billing Document to Accounting.
    3. Account Key not maintained in Pricing Procedure:
    Impact: This may create accounting document, but if condition type, which are to be posted to account, but do not have account key maintained in pricing procedure, it will not be post the relevant condition type to G/L account.
    4. Billing Document not being released to accounting --
    In Material Master, there is some link between Profit Centre & MRP Type. If one of it is not maintained, erratically few documents get stuck while releasing Billing Document to accounting. Few of course get posted.
    Solution1: Cancel Billing Document --> Reverse PGI --> Cancel Delivery --> Block the sales Order & Create new sales Cycle all over again after rectifying Material master.
    Solution 2: (Temporary Solution) In Debug mode in Billing, force the Profit Center in Billing Document with the help of Abaper. But ensure Material master is rectified.
    From FI Side, you require to check that all the G/L account has been maintained through T.Code: FS00. G/L account being Master data has to be created in each client to upload through LSMW / SCATT / BDC.
    In Billing Document in change mode (in the first screen where we enter Billing Document number), on the top most left hand corner, take a dropdown on Billing Document & select Release to accounting. Here you can get the under mentioned possible message:
    1. G/L account not found
    2. Cost Element not maintained for G/L account.
    In both the above cases, FI consultant requires to take corrective action.
    Pricing:
    This is very specific & differs from client to client & may also differ based on scenario.
    Write-up on Pricing -
    In SD, Pricing Procedure is determined based on Sales Area (Sales Organization + Distribution Centre + Division) + Customer Pricing Procedure + Document Pricing Procedure. Sales Area is determined in Sales Order Header Level. Customer Pricing Procedure is determined from Customer Master. Document Pricing Procedure is determined from Sales Document Type / Billing Type (if configured). Once the pricing procedure is determined, Condition records are fetched. If appropriate condition records are found, the price is determined. If Mandatory pricing condition is missing, system will through an error message.
    In SD, the steps to configure Pricing procedure are as under:
    Step 1:
    Condition table: If existing condition table meets the requirement, we need not create a new condition table. Considering the requirement for new condition table, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Condition Table (select the required fields combination, which will store condition record).
    Step 2:
    Access Sequence: If existing access sequence meets the requirement, we need not create a new access sequence. Considering the requirement for new sequence, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Access Sequence (Access sequence is made up of Accesses (Tables) & the order of priority in which it is to be accessed. Here we assign the condition table to access sequence.
    Step 3:
    Condition Type: If existing condition type meets the requirement, we need not create a new condition type. Considering the requirement for new condition type, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Condition Type. It is always recommended to copy an existing similar condition type & make the necessary changes. Here we assign Access sequence to Condition type.
    Step 4:
    a. Pricing Procedure: It is recommended to copy a similar pricing procedure & make the necessary changes in new pricing procedure. Pricing Procedure is a set of condition type & arranged in the sequence in which it has to perform the calculation. Considering the requirement for new Pricing Procedure, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Pricing Procedure --> Maintain Pricing Procedure.
    b. Pricing Procedure: After maintaining the pricing procedure the next step will be determination of pricing procedure. Configuration for determining pricing procedure in SPRO is as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Pricing Procedure --> Determine Pricing Procedure.
    5. Condition record: Condition record is a master data, which is required to be maintained by Core team / person responsible from the client. During new implementation, the condition records can be uploaded using tools like SCAT, LSMW, etc.
    It is assumed that document pricing procedure, customer pricing procedure , ... are in place.
    Sales Document not assigned to Sales Area:
    SPRO --> Sales & Distribution --> Sales --> Sales Documents --> Sales Document Header --> Assign Sales Area To Sales Document Types --> Assign sales order types permitted for sales areas (do ensure to maintain combined Sales organization, combined Distribution channel & combined division. for eg: Sales org 1000 & sales org 1000, Sales org 2000 & sales org 2000, & so on ....
    similarly for distribution channel & Division, so that the Sales area combination is available for assignment to Sales Document Type.)
    Issues related to Customer Master data:
    1. what is the impact of leaving customer pricing procedure & customer statistic group blank in customer master --> sales area data --> sales tab:
    If Customer Pricing Procedure is left blank, Pricing will not be determined.
    If customer statistic group is left blank, then data will not flow to standard reports.
    2. Who maintains reconciliation account in customer master?
    Ideally, reconciliation account is maintained by FI person, but if SD person is authorized & has the knowledge of which reconciliation account to be maintained, then even SD person can maintain the same.
    3. Terms of payment appear in Company Code Data & sales Area Data. What is the impact of each? why is it not populated automatically, once it is maintained at either field?
    Terms of payment from company code data is for reporting purpose & it is from sales area data that it flows to sales order.
    It is a standard feature of SAP that it is not populated automatically if maintained at either of the field, but it is a must in sales area data & can be skipped in company code data.
    4. Unable to select Sales Area for Customer Master Creation?
    Most Probably either sales area is not defined or customization not done for common Sales Org & Common Distribution Channel. To maintain this configuration: SPRO --> Sales & Distribution --> Master Data --> Define Common Distribution Channels / Define Common Divisions

  • DESKI Report using Temp tables in MS- SQL server 2005

    Hi,
    I am trying to create a Free hand SQL DESKI report using temp tables in MS SQL Server-2005, I am using ODBC connection.
    When I run the report, I am getting the error
    u201CConnection or SQL sentence error (DA0005) No column or data to fetchu201D
    Ex:
    Select *
    into #t1
    from region
    select * from #t1
    drop table #t1
    Please help.
    Regards,
    Pratik

    Pratik, the SQL does not seem right. BTW you can only retreive data via Deski Free hand SQL. Also try to use OLE DB connection.

  • Crystal Reports 2008 - Changing Table Locations

    Hello,
    we have several reports which we use by different customers. The customers use different name spaces (table locations) for the same data. To use the same reports with different table locations, we wrote a piece of software replacing the connection strings and table locations. 
    Example:
    A report should be used in a test environment as well as in a production environment:
      The original SQL is (using a DB2 database on a AS400):
        SELECT alias.name FROM as400.production.users alias
      The modified SQL looks like:
        SELECT alias.name FROM as400.test.users alias
    Up to now we used Crystal XI and developed using RDC. We solved the above described problem by reading the report SQL string, replacing the table location in this string and assigned it back to the report object. Modifying the SQL string has the advantage that it works fine also for reports which contain a SQL command.
    Since Crystal Reports 2008 this is not possible anymore (no RDC, no direct way to modify the report SQL string).
    My first approach was to use the CrystalDecisions.CrystalReports.Engine.Table object. First I just wanted to see what really was the content of the Location and Name property:
    for (int i = 0; i < rdReport.Database.Tables.Count; ++i)
      Table rt = rdReport.Database.Tables<i>;
      Console.WriteLine("Table Nr : {0}", i);                   
      Console.WriteLine("  Table Loc  : {0}", rt.Location);
      Console.WriteLine("  Table Name : {0}", rt.Name);
    My problem with this is that the output for the report with the SQL in the above example is:
    Table Nr: 0
      Table Loc : users
      Table Name: alias
    So obviously not the real table location and table name is returned, but instead the table name for the table location and the alias for the table name. Unsurprisingly setting the location had not the originally desired effect.
    Furthermore if the report was designed using a SQL command, the location and in the name property contain the string COMMAND. Therefore the table object doesn't seems to be the solution to my problem.
    Thanks to the help of a user in this forum here, I figured out how to read the SQL string of a report. Unfortunately I did not found a way to assign it back to the report.
    Has anybody here an idea how to solve my problem? I'm open for every kind of hint.
    Thanks in advance,
    Ron

    My solution looks like this:
    ReportDocument rdReport = new ReportDocument();                   
    rdReport.Load(sReportName, OpenReportMethod.OpenReportByTempCopy);
    CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rcDocument = rdReport.ReportClientDocument;                   
    for (int i = 0; i < rdReport.Database.Tables.Count; ++i)
        CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable rctTable = rcDocument.DataDefController.Database.Tables<i>;
        if (rctTable.ClassName == "CrystalReports.CommandTable")
            Console.WriteLine("Processing CommandTable {0}",rctTable.Name);
            Console.WriteLine("  Old Qualified Name: {0}", rctTable.QualifiedName);
            Console.WriteLine("  Old Alias:          {0}\n" , rctTable.Alias);
            CrystalDecisions.ReportAppServer.DataDefModel.CommandTable tbOldCmd = (CrystalDecisions.ReportAppServer.DataDefModel.CommandTable) rctTable;
            CrystalDecisions.ReportAppServer.DataDefModel.CommandTable tbNewCmd = new CrystalDecisions.ReportAppServer.DataDefModel.CommandTable();
            tbNewCmd.Name = tbOldCmd.Name;
            tbNewCmd.Alias = tbOldCmd.Alias;
            tbNewCmd.CommandText = sNewSql;
            tbNewCmd.ConnectionInfo = tbOldCmd.ConnectionInfo.Clone(true);
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbAttr = tbNewCmd.ConnectionInfo.Attributes;
            // set dlls
            pbAttr["Database DLL"] = "crdb_ado.dll";
            pbAttr["QE_DatabaseName"] = "NL67S021OUD";
            pbAttr["QE_DatabaseType"] = "OLE DB (ADO)";
            pbAttr["QE_ServerDescription"] = "192.0.5.24";
            pbAttr["QE_SQLDB"] = "True";
            pbAttr["SSO Enabled"] = "False";
            // set connection string                  
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbLogOnProp = (CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag)pbAttr[sAttrLogOnProp];
            pbLogOnProp.RemoveAll();
            // strangely comma seperated values instead of semicolon seperated values are needed here
            pbLogOnProp.FromString("Provider=IBMDA400,Data Source=" + sServerName + ",Initial Catalog=" + sDBName + ",User ID=" + sUserId + ",Password=" + sPwd + ",Convert Date Time To Char=TRUE,Catalog Library List=,Cursor Sensitivity=3");
            tbNewCmd.ConnectionInfo.UserName = sUserId;
            tbNewCmd.ConnectionInfo.Password = sPwd;
            rcDocument.DatabaseController.SetTableLocation(tbOldCmd, tbNewCmd);                           
        else
            Console.WriteLine("Processing Table {0}",rctTable.Name);                           
            Console.WriteLine("  Old Qualified Name: {0}", rctTable.QualifiedName);
            Console.WriteLine("  Old Alias:          {0}\n", rctTable.Alias);
            CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable rctNew = new CrystalDecisions.ReportAppServer.DataDefModel.Table();
            rctNew.Name = rctTable.Name;
            rctNew.Alias = rctTable.Alias;
            rctNew.QualifiedName = sDBName + ".V41TSTDBF.CRGUOPF";
            rctNew.ConnectionInfo = rctTable.ConnectionInfo.Clone(true);
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbAttr = rctNew.ConnectionInfo.Attributes;
            // set dlls
            pbAttr["Database DLL"] = "crdb_ado.dll";
            pbAttr["QE_DatabaseName"] = "NL67S021OUD";
            pbAttr["QE_DatabaseType"] = "OLE DB (ADO)";
            pbAttr["QE_ServerDescription"] = "192.0.5.24";
            pbAttr["QE_SQLDB"] = "True";
            pbAttr["SSO Enabled"] = "False";
            // set connection string                  
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbLogOnProp = (CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag) pbAttr[sAttrLogOnProp];
            pbLogOnProp.RemoveAll();
            // strangely comma seperated values instead of semicolon seperated values are needed here
            pbLogOnProp.FromString("Provider=IBMDA400,Data Source=" + sServerName + ",Initial Catalog=" + sDBName + ",User ID=" + sUserId + ",Password=" + sPwd + ",Convert Date Time To Char=TRUE,Catalog Library List=,Cursor Sensitivity=3");
            rctNew.ConnectionInfo.UserName = sUserId;
            rctNew.ConnectionInfo.Password = sPwd;                         
            rcDocument.DatabaseController.SetTableLocation(rctTable, rctNew);
            Console.WriteLine("  New Qualified Name: {0}", rctTable.QualifiedName);
            Console.WriteLine("  New Alias:          {0}\n", rctTable.Alias);
    Console.WriteLine("\nSetting parameter {0} to value {1}", rdReport.ParameterFields[0].Name, iDataId);
    rdReport.SetParameterValue(0, iDataId);
    Console.WriteLine("\nShow SQL: ");
    CrystalDecisions.ReportAppServer.Controllers.RowsetController rsController;
    CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rdClient = rdReport.ReportClientDocument;
    CrystalDecisions.ReportAppServer.DataDefModel.ISCRGroupPath rdGroupPath = new CrystalDecisions.ReportAppServer.DataDefModel.GroupPath();
    string temp;
    string sql;
    rsController = rdClient.RowsetController;
    sql = rsController.GetSQLStatement(rdGroupPath, out temp);
    Console.WriteLine(sql);
    Console.WriteLine("Printing");
    PageMargins pmMargins = rdReport.PrintOptions.PageMargins;
    pmMargins.bottomMargin = 350;
    pmMargins.leftMargin = 350;
    pmMargins.rightMargin = 350;
    pmMargins.topMargin = 350;
    rdReport.PrintOptions.ApplyPageMargins(pmMargins);
    rdReport.PrintOptions.PrinterName = sPrinterName;
    rdReport.PrintToPrinter(1,     // copies
                            false, // collated
                            0,     // start page
                            0);   // end page
    rdReport.Close();
    Regards,
    Ron

  • Fatch data in ALV Reports from multiple Tables

    Respected Sir,
    How to fatch data in ALV Grid report from selected Field and selected Table.
    Please Help and My require Field and Table is :
    sono LIKE vbak-vbeln,
           sodat LIKE vbak-erdat,
           cust LIKE kna1-name1,
           pono LIKE vbkd-bstkd,
           podat LIKE vbkd-bstdk,
           item_no LIKE vbap-posnr,
           item_des LIKE vbap-arktx,
           name LIKE vbak-kunnr,
           pdate LIKE vbak-bstdk,
           acdel LIKE lips-lgmng,
           netweight LIKE likp-ntgew,
           ordval LIKE VBRP-netwr,
       CUST_MAT_NO LIKE VBAP-KDMAT,
           order_qty LIKE vbap-kwmeng,
           desp_qty(5) TYPE p DECIMALS 2, "LIKE lips-lfimg,
           balance(5) TYPE p DECIMALS 2,
           delv_no LIKE likp-vbeln,
           delv_dat LIKE likp-bldat,
           invoice LIKE vbrk-vbeln,
           exnum like J_1IEXCHDR-exnum,
           invoice_dat LIKE vbrk-fkdat,
           invoice_val LIKE konv-kwert,
           END OF it_out.
    *Please Refere the following code and if u wnt to change at ur own ieda u can change and reply me back.*
    *Thnaks In ADVANCE.*
    *Please Do  need full it.*
    *Bhavesh Panchal*
    *Baroda*
    Also I Make Reports For SO : full coding is.
    *& Report  Z_NEW1
    REPORT  Z_NEW1.
    TABLES : vbak,    "Sales Document: Header Data
             vbkd,    "Sales Document: Business Data
             likp,    "SD Document: Delivery Header Data
             vbrk,    "Billing Document: Header Data
             konv,    "Conditions (Transaction Data)
             lips,    "SD document: Delivery: Item data
             vbap,    "Sales Document: Item Data
             vbrp,    "Billing Document: Item Data
             kna1,    "General Data in Customer Master
             J_1IEXCHDR.
    DATA : i_vbak LIKE vbak OCCURS 10 WITH HEADER LINE.
    DATA : it_vbkd LIKE vbkd OCCURS 10 WITH HEADER LINE.
    DATA : it_likp LIKE likp OCCURS 10 WITH HEADER LINE.
    DATA : it_vbrk LIKE vbrk OCCURS 10 WITH HEADER LINE.
    DATA : it_konv LIKE konv OCCURS 10 WITH HEADER LINE.
    DATA : it_lips LIKE lips OCCURS 10 WITH HEADER LINE.
    DATA : it_vbap LIKE vbap OCCURS 10 WITH HEADER LINE.
    DATA : it_vbrp LIKE vbrp OCCURS 10 WITH HEADER LINE.
    DATA : it_kna1 LIKE kna1 OCCURS 10 WITH HEADER LINE.
    DATA : it_vbrp1 LIKE vbrp OCCURS 10 WITH HEADER LINE.
    DATA : it_temp LIKE lips OCCURS 10 WITH HEADER LINE.
    DATA : it_lips1 LIKE lips OCCURS 10 WITH HEADER LINE.
    DATA : it_lips2 LIKE lips OCCURS 10 WITH HEADER LINE.
    DATA : it_lips3 LIKE lips OCCURS 10 WITH HEADER LINE.
    DATA : it_vbak1 LIKE vbak OCCURS 10 WITH HEADER LINE.
    DATA : it_vbak2 LIKE vbak OCCURS 10 WITH HEADER LINE.
    DATA : it_vbap1 LIKE vbap OCCURS 10 WITH HEADER LINE.
    DATA : it_posnv LIKE zdelprt OCCURS 10 WITH HEADER LINE.
    DATA : BEGIN OF it_out OCCURS 10,
           sono LIKE vbak-vbeln,
           sodat LIKE vbak-erdat,
           cust LIKE kna1-name1,
           pono LIKE vbkd-bstkd,
           podat LIKE vbkd-bstdk,
           item_no LIKE vbap-posnr,
           item_des LIKE vbap-arktx,
           name LIKE vbak-kunnr,
           pdate LIKE vbak-bstdk,
           acdel LIKE lips-lgmng,
           netweight LIKE likp-ntgew,
           ordval LIKE VBRP-netwr,
       CUST_MAT_NO LIKE VBAP-KDMAT,
           order_qty LIKE vbap-kwmeng,
           desp_qty(5) TYPE p DECIMALS 2, "LIKE lips-lfimg,
           balance(5) TYPE p DECIMALS 2,
           delv_no LIKE likp-vbeln,
           delv_dat LIKE likp-bldat,
           invoice LIKE vbrk-vbeln,
           exnum like J_1IEXCHDR-exnum,
           invoice_dat LIKE vbrk-fkdat,
           invoice_val LIKE konv-kwert,
           END OF it_out.
    SELECT-OPTIONS: sono FOR vbak-vbeln.
    SELECT-OPTIONS: customer FOR vbak-kunnr.
    SELECT-OPTIONS: d_date FOR likp-bldat.
       LOOP AT it_OUT.
       select * into table i_vbak from vbak
       where vbeln IN sono.
       sono = vbak-vbeln.
       append it_out.
       modify it_out.
       endloop.
    LOOP AT it_out.
          SELECT single vbeln netwr FROM vbak
              INTO (it_out-pono,it_out-podat)
              WHERE vbeln = it_out-sono.
              "it_out-item_no.
         append it_out.
       ENDLOOP.
        select * into table i_vbak from vbak
        where vbeln IN sono.
        call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
        i_structure_name = 'VBAK'
        I_grid_title     = 'Bhavesh Panchal'
        tables
        t_outtab = i_vbak
        t_outtab = it_out
         exceptions
         others = 1.

    Hi Bhavesh Panchal  ,
    You have to create another internal table with fields which you would like to display in the ALV output.
    once you fetch the data from different tables into respective internal tables.  loop those internal tables and insert the field values to internal table which you want to display in ALV output.
    Create  field catalog for the internal table created for  ALV  output.
    Hope it shall be useful.
    Regards
    Santosh Kumaar.M

  • [Trouble] The Report has no tables

    Hi there,
    i have trouble in using Crystal Reports for .NET 2.0.
    I load a CSV file via JetDB Provider as Text database and try to use it as DataSource for my report.
    But it crashes all time, with a error like this "report has no tables".
    Actually i dont really know Crystal Reports well, i got the project from an ex-employment from our Company.
    Of course i readed the PDF documentations "Reporting Off ADO.NET Datasets", "Crystal Reports Guide To ADO.NET", "Connecting the Report Designer Component to a Data Source" but that didnt help me at all.
    So i hope you guys can help me,
    here are the code: http://rafb.net/p/hMon9Z65.html
    with best regards,
    Torsten Sailer

    So if I understand correctly, you are loading data from a CSV file into a DataSet object and passing the DataSet to a report that you have loaded using the ReportDocument object?  Are you using the SetDataSource() method to pass the DataSet to the report?  
    Make sure that the schema of the DataSet isn't changing from when you designed the report.  The report's schema must match the DataSet schema when passing the DataSet to the report. 
    The best way to troubleshoot the issue is when the error occurs, write out the DataSet to an .xml file (with the schema) and then in a simple Windows app, load the same report, and the xml schema/data into a DataSet object (rather than the CSV) and see if the same error occurs.  If it does, open the report in design and do a "Set Database Location" to your xml file and see if it picks up any changes.  If it does, then that might be the reason why it errors....the schemas are not matching and you need you find out why.
    <p>-MJ</p>

  • MII report for MII table maintenance

    Hi Experts
    My functional consultants want an easy way to update data in bespoke tables within the MII database.
    They want to do mass updates. This is so they can run a demo of some interfaces, then reset the MII data to its previous state.
    They cannot log on to SQL.
    My plan is to enable this using an MII report running an update query/queries.
    Has anyone done something similar? Can anyone give an example of an MII report to show table data and then allow the data to be updated in the underlying table (I suppose using an update query, allowing flexible updates)?
    Or is there an easier way to enable a user-friendly table maintenance? Has to be something quick to build
    Many thanks,       Ben

    2. in Web, create irpt with this script
    function Selection(){
         var myApplet = document.iGridBatchData;
         var myGridObject = myApplet.getGridObject();
         var rowCount = myGridObject.getSelectedRowCount();
         var txt = "";
         for (i=1; i <=rowCount; i++) {
              var RowNumber = myGridObject.getSelectedRowAt(i);
               txt= txt + "," + myGridObject.getCellValueByName(RowNumber,"DateTime") ;          
         var txtLength = txt.length;
         txt =txt.substring(1, txtLength);
         var SQL = "SELECT * FROM x where DATETIME not in " + "(" + txt + ")";
         document.getElementById('TT1').value=SQL;     
    in body
    <APPLET NAME="iGridBatchData" CODEBASE="/XMII/Classes" CODE="iGrid" ARCHIVE="illum8.zip" WIDTH="640" HEIGHT="400" TABINDEX=1 MAYSCRIPT>
         <PARAM NAME="QueryTemplate" VALUE="Default/MultipleSelection/TagHistory">
         <PARAM NAME="DisplayTemplate" VALUE="Default/MultipleSelection/GridMultiple">
         <PARAM NAME="SelectionEvent" VALUE="Selection">
    </APPLET> </p>
       <input type="text" id="TT1"  class="txtField"  maxlength="400" size="200"> </p>
    The answer is something like this
    SELECT * FROM x where DATETIME not in (Aug 12, 2011 11:55:01 AM,Aug 12, 2011 11:56:01 AM)
    Aug 12, 2011 11:55:01 AM,Aug 12, 2011 11:56:01 AM is from 2 rows selection and it will increate for multiple rows you selected. Now you just need to change the SQL to update statement.
    regards
    sengkiang
    Edited by: Seng Kiang Hoe on Aug 12, 2011 1:09 PM

Maybe you are looking for