Ask help pls dates and logical.

Hi all the gurus

I need where I need to put togahter of series of the chronology of events in the past as a line on the dates.

It comes to my table.

CREATE TABLE 'GET OUT '. "" SOR_TRACKING ".

(ACTIVATE THE "TRACKING_ID" NUMBER NOT NULL,)

ACTIVATE THE "LETTER_ID" NUMBER NOT NULL,

ACTIVATE THE "OFFENDER_ID" NUMBER NOT NULL,

ACTIVATE THE 'LOCATION_ID' NUMBER NOT NULL,

NUMBER OF "OFFICE_ID."

ACTIVATE THE "MAIL_DATE" DATE DEFAULT SYSDATE NOT NULL,.

DATE OF THE "RESPONSE_DATE."

"STATUS' VARCHAR2() 30 BYTES) by DEFAULT"sent. "

ACTIVATE THE "ENTRY_DATE" DATE DEFAULT SYSDATE NOT NULL,.

'ENTRY_USER'(VARCHAR2) 30 BYTES) ENABLE NOT NULL,.

'COMMENTS' VARCHAR2() 2000 BYTES).

"First name"(VARCHAR2) 80 BYTES) ENABLE NOT NULL,.

"MIDDLE_NAME"(VARCHAR2) 80 BYTES).

'Name'(VARCHAR2) 80 BYTES) ENABLE NOT NULL,.

'SIR_NAME'(VARCHAR2) 30 BYTES).

"Address1"(VARCHAR2) 80 BYTES).

"Address2"(VARCHAR2) 80 BYTES).

'CITY' VARCHAR2() 50 BYTES).

('STATE' VARCHAR2() 30 BYTES).

"ZIP"(VARCHAR2) 20 BYTES).

'COUNTY'(VARCHAR2) 80 BYTES).

'OFFENDER_TYPE'(VARCHAR2) 30 BYTES).

DATE OF THE "LAST_MAIL_DATE."

ACTIVATE THE "BATCH_ID" NUMBER NOT NULL,

NUMBER OF "COMPETENCE."

'DL_NAME'(VARCHAR2) 60 BYTES).

'DL_OFFICE'(VARCHAR2) 60 BYTES).

'DL_ADDRESS'(VARCHAR2) 60 BYTES).

'DL_MAILING_ADDRESS'(VARCHAR2) 60 BYTES).

'DL_CITY'(VARCHAR2) 60 BYTES).

'DL_STATE'(VARCHAR2) 30 BYTES).

'DL_ZIP'(VARCHAR2) 20 BYTES).

"TITLE"(VARCHAR2) 10 BYTES).

'MODIFIED_USER'(VARCHAR2) 30 BYTES).

DATE OF THE "MODIFIED_DATE."

KEY CONSTRAINT PRIMARY 'PK_SOR_TRACKING' ('TRACKING_ID'))

Date of the sample

INSERTION of REM in SOR_TRACKING

TOGETHER TO DEFINE

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE ((, MODIFIED_USER, MODIFIED_DATE) values (781410,1,4557,110207,2809, to_date (November 5, 13 ',' DD-MON-RR'), null, 'Sent mail', to_date (November 5, 13 ',' DD-MON-RR'), "NOMA", null, 'BOB","Jolene","Luna", null, ' 20535 Valleyview Rd', null,'Boo','OK','74840','potter','STANDARD',to_date('15-FEB-12','DD-MON-RR'),30211,2809,null,null,null,null,null,null,null,'Ms.','NEEL',to_date('05-NOV-13','DD-MON-RR '));

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (190294,1,4557,110207,2809, to_date (February 8, 12 ',' DD-MON-RR'), to_date (February 15, 12 ',' DD-MON-RR'), 'Checked', to_date (February 17, 12 ',' DD-MON-RR'), 'Casper', null, 'BOB', 'Jolene', 'Luna', null, ' 20535 Valleyview Rd', null, 'Boo', 'OK', '74840', 'potter', 'STANDARD', to_date('13-DEC-11','DD-MON-RR'), 28442,2809,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (184647,1,4557,110207,2809, to_date (December 5, 11 ',' DD-MON-RR'), to_date (December 13, 11 ',' DD-MON-RR'), 'Checked', to_date (December 15, 11 ',' DD-MON-RR'), 'Casper', null, 'BOB', 'Jolene', 'Luna', null, ' 20535 Valleyview Rd', null, 'Boo', 'OK', '74840', 'potter', 'STANDARD', to_date('09-NOV-11','DD-MON-RR'), 27985,2809,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (157253,1,4557,102288,2809, to_date (February 3, 11 ',' DD-MON-RR'), null, 'Sent mail', to_date (February 3, 11 ',' DD-MON-RR'), 'Casper', null, 'BOB', 'Jolene', 'Luna', null, 'P.c. 146', null, 'Boo', 'OK','74840 ', 'potter', 'STANDARD', to_date('08-NOV-10','DD-MON-RR'), 25613,2809,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (149710,1,4557,102288,2809, to_date (November 1, 10 ',' DD-MON-RR'), to_date (November 8, 10 ',' DD-MON-RR'), 'Checked', to_date (November 16, 10 ',' DD-MON-RR'), 'Casper', null, 'BOB', 'Jolene', 'Luna', null, 'P.c. 146', null, 'Boo', 'OK','74840 ', 'potter', 'STANDARD', to_date('18-OCT-10','DD-MON-RR'), 24939,2809,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (138268,1,4557,99564,2809, to_date (June 3, 10 ',' DD-MON-RR'), to_date (June 17, 10 ',' DD-MON-RR'), 'Letter returned', to_date (June 17, 10 ',' DD-MON-RR'),'Boo ',' post office: no taking mail ', "BOB", "Jolene", "Luna", null, 20535 Valley View Rd.', null, 'Boo', 'OK', '74840', 'potter', 'STANDARD', to_date('19-MAY-10','DD-MON-RR'), 24216,2809,null,null,null,null,null,null, null) 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (128798,1,4557,91503,2809, to_date (February 4, 10 ',' DD-MON-RR'), null, 'Sent mail', to_date (February 4, 10 ',' DD-MON-RR'), 'Casper', null, 'BOB', 'Jolene', 'Luna', null, 'P.c. 146', null, 'Boo', 'OK','74840 ', 'potter', 'STANDARD', to_date('10-NOV-09','DD-MON-RR'), 23369,2809,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (115073,1,4557,91503,2809, to_date (7 August 09 ',' DD-MON-RR'), to_date (10 November 09 ',' DD-MON-RR'), 'Checked', to_date (10 November 09 ',' DD-MON-RR'), 'Boo', null, 'BOB', 'Jolene', 'Luna', null, 'P.c. 146', null, 'Boo', 'OK','74840 ', 'potter', 'STANDARD', to_date('06-MAY-09','DD-MON-RR'), 21926,2809,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (108510,1,4557,91503,2809, to_date (5 May 09 ',' DD-MON-RR'), to_date (6 May 09 ',' DD-MON-RR'), 'Checked', to_date (7 May 09 ',' DD-MON-RR'), 'Casper', null, 'BOB', 'Jolene', 'Luna', null, 'P.c. 146', null, 'Boo', 'OK','74840 ', 'potter', 'STANDARD', to_date('01-MAY-09','DD-MON-RR'), 21316,2809,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (101463,1,4557,88052,2809, to_date (5 February 09 ',' DD-MON-RR'), null, 'Sent mail', to_date (5 February 09 ',' DD-MON-RR'), 'Boo', null, 'BOB', "Jolene", "Luna", null, PO Box 146, null, 'Boo', 'OK', '74840', 'potter', 'STANDARD', to_date('15-DEC-08','DD-MON-RR'), 20525,2809,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (97272,1,4557,88052,2809, to_date (5 December 08 ',' DD-MON-RR'), to_date (15 December 08 ',' DD-MON-RR'), 'Checked', to_date (17 December 08 ',' DD-MON-RR'), 'Casper', null, 'BOB', 'Jolene', 'Luna', null, 'P.c. 146', null, 'Boo', 'OK','74840 ', 'potter', 'STANDARD', to_date('12-NOV-08','DD-MON-RR'), 20018,2809,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (to_date 68398,1,4557,76399,1070, (10 October 07 ',' DD-MON-RR'), to_date (15 November 07 ',' DD-MON-RR'), 'Letter returned', to_date (15 November 07 ',' DD-MON-RR'), 'KERRYMIN',' post office: not delivaerable then addressed ', 'BOB","Jolene","Luna", null, 752 Boo ', null, 'Norman', 'OK','73072 ', 'Cleveland', 'STANDARD', to_date('17-MAY-07','DD-MON-RR'), 16596,1070,null,null,null,null,null,null,null, 'Ms.', null) ", null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (63767,1,4557,76399,1070, to_date (9 August 07 ',' DD-MON-RR'), to_date (20 August 07 ',' DD-MON-RR'), 'Letter returned', to_date (20 August 07 ',' DD-MON-RR'), 'KERRYMIN',' post office: not deliverable as addressed ', "BOB", "Jolene", "Luna", null, 752 Boo', null, 'Norman', 'OK', '73072', 'Cleveland', 'STANDARD', to_date('17-MAY-07','DD-MON-RR'), 16077,1070,null,null,null,null,null,null,null, 'Ms.', null) ", null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (59499,1,4557,76399,1070, to_date (14 May 07 ',' DD-MON-RR'), to_date (17 May 07 ',' DD-MON-RR'), 'Checked', to_date (17 May 07 ',' DD-MON-RR'), 'LAWANHAM', null, 'BOB', "Jolene", "Luna", null, 752 Boo ', null, 'Norman', 'OK','73072 ', 'Cleveland', 'STANDARD', to_date('14-MAY-07','DD-MON-RR'), 15569,1070,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (54783,1,4557,74693,1070, to_date (1 March 07 ',' DD-MON-RR'), to_date (6 March 07 ',' DD-MON-RR'), 'Checked', to_date (13 March 07 ',' DD-MON-RR'), 'Boo', null, 'BOB', 'Jolene', 'Luna', null, '1203 Rebecca Lane', null, 'Norman', 'OK', '73072', 'Cleveland', 'STANDARD', to_date('01-MAR-07','DD-MON-RR'), 14994,1070,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP ((, TITLE, MODIFIED_USER, MODIFIED_DATE) values (34100,1,4557,58761,1094,to_date('08-FEB-06','DD-MON-RR'),null,'Mailed',to_date('31-MAR-06','DD-MON-RR'),'LAWANHAM','per M. Splawn', 'BOB', 'Jolene', 'Luna' null, 'RT. 1 Box 42' null, 'Wewoka', 'OK', '74884', 'Seminole', 'STANDARD' (to_date '03-FEB-06', ' DD-MON-RR'),9560,1094,null null null null null null, null, 'Ms.' null, null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (27562,1,4557,52781,1115, to_date (8 November 05 ',' DD-MON-RR'), null, 'Sent mail', to_date (8 November 05 ',' DD-MON-RR'), 'Boo', null, "BOB',"Jolene","Luna", null, 5590 Rebel Ridge Rd ', null", El Reno, OK ', ' 73036', 'Canadian', 'STANDARD', to_date('16-OCT-05','DD-MON-RR'), 8034,1115,null,null,null,null,null,null,null, 'Ms.', null, null);

Insert into SOR_TRACKING (TRACKING_ID LETTER_ID OFFENDER_ID, location_id OFFICE_ID MAIL_DATE RESPONSE_DATE STATE, ENTRY_DATE ENTRY_USER COMMENTS, FIRST_NAME, MIDDLE_NAME LAST_NAME, SIR_NAME Address1 address2 CITY ,,ZIP COUNTY OFFENDER_TYPE LAST_MAIL_DATE BATCH_ID JURISDICTION DL_NAME DL_OFFICE DL_ADDRESS DL_MAILING_ADDRESS DL_CITY DL_STATE DL_ZIP ) ,TITLE,MODIFIED_USER,MODIFIED_DATE) values (11822,1,4557,39238,1094,to_date('03-MAR-05','DD-MON-RR'),null,'Mailed',to_date('03-MAR-05','DD-MON-RR'),'Boo',null,'BOB','Jolene','Luna',null,'Rt. 1, Box 42',null,'Wewoka','OK','74884','Seminole','STANDARD',to_date('17-FEB-05','DD-MON-RR'),306,null,null,null,null,null,null,null,null,'Ms.',null,null);

Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP TITRE (, MODIFIED_USER, MODIFIED_DATE) values (2257,1,4557,18958,1087, to_date (3 August 04 ',' DD-MON-RR'), null, "Sent mail", to_date (29 January 05 ',' DD-MON-RR'), 'SYSTEM', null, 'BOB', "Jolene", "Luna" ', null, ' ' training of 1037 Tabor, null, 'Oklahoma City', 'OK', '73107', null, null, "Oklahoma", 178, null, null, null, null, null, null, null, null, null, null, null);

I want to find all the records where the mail date() oldest of all without the answer) and no response date and find the one earlier including the response date and display it as a line.

For example

mail_Date + 45 table mail_Date earlier response

DEL_DATES END_DATE TRACKING_ID BEGIN_DATE

17 SEP-04 3 AUGUST 04 2257 6 MARCH 07

Other date and their date of response should be the same way

The problem is that I am not able to retrieve other records in the tables because I use the MIN function.

here is my request

SELECT t. MAIL_DATE + begin_Date 45,

del_date.del_dates,

(St2 SELECT MIN().) Del_end_date RESPONSE_DATE)

Sor_tracking ST2

WHERE t. OFFENDER_ID = st2. OFFENDER_ID

AND st2. RESPONSE_DATE > del_date.del_dates

) End_date.

t . OFFENDER_ID,

t . TRACKING_ID

Of

(St1 SELECT MIN().) Del_dates MAIL_DATE)

OF sor_tracking st1

WHERE the st1. OFFENDER_ID = 4557

AND st1. RESPONSE_DATE IS NULL

AND st1. MAIL_DATE < SysDate - 45

AND st1. STATUS ('letter returned', 'sent')

AND st1. LETTER_ID IN (1, 4)

) del_date,.

sor_tracking t

OÙ t. MAIL_DATE < = del_date.del_dates

ET (t. OFFENDER_ID = 4557

ET t. RESPONSE_DATE IS NULL)

ORDER BY 1 desc

Thank you for your time and help.

with

sor_tracking as

(select 4557 offender_id

1 letter_id,

to_date('05-Nov-13','dd-mon-yy') mail_date,

781410 tracking_id

110207 location_id,

response_date null,

Status "sent mail".

of the double

Union of all the

Select 4557,1, to_date (8 February 12 "," dd-MON-yy'), 190294,110207, to_date (15 February 12 "," dd-MON-yy'), "Verified" of any union double

Select 4557,1, to_date (5 December 11 "," dd-MON-yy'), 184647,110207, to_date (13 December 11 "," dd-MON-yy'), "Verified" of any union double

Select 4557,1, to_date (3 February 11 "," dd-MON-yy'), 157253,102288, null, 'By' from dual union all

Select 4557,1, to_date (1 November 10 "," dd-MON-yy'), 149710,102288, to_date (8 November 10 "," dd-MON-yy'), "Verified" of any union double

Select 4557,1, to_date (3 June 10 "," dd-MON-yy'), 138268,99564, to_date (17 June 10 "," dd-MON-yy'), 'Returned letter' from dual union all

Select 4557,1, to_date (4 February 10 "," dd-MON-yy'), 128798,91503, null, 'By' from dual union all

Select 4557,1, to_date (7 August 09 "," dd-MON-yy'), 115073,91503, to_date (10 November 09 "," dd-MON-yy'), "Verified" of any union double

Select 4557,1, to_date (5 May 09 "," dd-MON-yy'), 108510,91503, to_date (6 May 09 "," dd-MON-yy'), "Verified" of any union double

Select 4557,1, to_date (5 February 09 "," dd-MON-yy'), 101463,88052, null, 'By' from dual union all

Select 4557,1, to_date (5 December 08 ',' dd-MON-yy'), 97272,88052, to_date (15 December 08 ',' dd-MON-yy'), "Verified" of any union double

Select 4557,1, to_date (10 October 07 ',' dd-MON-yy'), 68398,76399, to_date (15 November 07 ',' dd-MON-yy'), 'Returned letter' from dual union all

Select 4557,1, to_date (9 August 07 ',' dd-MON-yy'), 63767,76399, to_date (20 August 07 ',' dd-MON-yy'), 'Returned letter' from dual union all

Select 4557,1, to_date (14 May 07 ',' dd-MON-yy'), 59499,76399, to_date (17 May 07 ',' dd-MON-yy'), "Verified" of any union double

Select 4557,1, to_date (1 March 07 "," dd-MON-yy'), 54783,74693, to_date (6 March 07 "," dd-MON-yy'), "Verified" of any union double

Select 4557,1, to_date (8 February 06 "," dd-MON-yy'), 34100,58761, null, 'By' from dual union all

Select 4557,1, to_date (8 November 05 ',' dd-MON-yy'), 27562,52781, null, 'By' from dual union all

Select 4557,1, to_date (3 March 05 ',' dd-MON-yy'), 11822,39238, null, 'By' from dual union all

Select 4557,1, to_date (3 August 04 "," dd-MON-yy'), 2257,18958, null, 'By' from dual

)

Select offender_id,

letter_id,

to_char(EVENT_DATE,'dd-mon-yy') mail_date,

tracking_id,

Location_id,

cases where last_response_verified is null

then the status

status of end,

to_char(last_response_verified,'dd-mon-yy') response_date,

cases where last_response_verified is not null

then 'Verified '.

end response_status

from (select offender_id,

letter_id,

EVENT_DATE,

tracking_id,

Location_id,

status,

to_find,

verified_response,

LAST_VALUE (verified_response Ignore Nulls) over (partition offender_id, letter_id

event_date desc order

) last_response_verified

from (select offender_id,

letter_id,

EVENT_DATE,

tracking_id,

Location_id,

status,

-case when event_date< lead(event_date)="" over="" (partition="" by="">

event_date order

) - 45

then 'THIS '.

When status = 'by '.

and lead (tracking_id) (partition offender_id, letter_id, tracking_id

event_date order

) is null

and direction! = lag(direction,1,'null') on (partition offender_id, letter_id

event_date order

)

then 'this '.

end to_find

-case when status = 'Verified '.

then event_date

end verified_response

from (select offender_id,

letter_id,

mail_date event_date,

tracking_id,

Location_id,

Status "Sent mail"

direction 'sent '.

of sor_tracking

Union of all the

Select offender_id,

letter_id,

response_date,

tracking_id,

Location_id,

status,

direction "rcvd.

of sor_tracking

where response_date is not null

)

)

)

where to_find is not null

event_date desc order

OFFENDER_ID LETTER_ID MAIL_DATE TRACKING_ID LOCATION_ID STATUS RESPONSE_DATE RESPONSE_STATUS
4557 1 NOVEMBER 5, 13 781410 110207 Mailed - -
4557 1 3 FEBRUARY 11 157253 102288 - DECEMBER 13, 11 Checked
4557 1 FEBRUARY 4, 10 128798 91503 - NOVEMBER 8, 10 Checked
4557 1 7 AUGUST 09 115073 91503 - 10 NOVEMBER 09 Checked
4557 1 5 FEBRUARY 09 101463 88052 - 6 MAY 09 Checked
4557 1 3 AUGUST 04 2257 18958 - 6 MARCH 07 Checked

Concerning

Etbin

Tags: Database

Similar Questions

  • Need to view daq reads per second but only to record a reading every 10 minutes. I would also like to record the date and time, at the same pace. Need help

    Need to show daq reads per second, but only to record a reading every 10 minutes, need help

    You are also looking to taste to 1 Hz data acquisition?

    My approach would be to use the DAQ acquisition to time your loop display reading each acquisition, then use the loop counter to control the logic of your writing to file.  For 1 Hz and 10 minutes write I would use 'quotient and remainder' I / 600; If rest = 0, then write the data point.

    For the date and time, under Calendar palette use the time get in seconds food a DateTime Format to a string.

  • Problem accessing my network on Vista drive when I try to back up the data on my PC... Does anyone know why it ask again me username and password?

    I recently bought an external hard drive Iomega Network home. I've successfully connected to my home network. When I tried to back up the data on my computer on the network drive using backup under system and Maintenance of the Panel, he continues to ask me as user name and password I have no installation. I tried to use my password of the router and several other passwords, but it does not help. I have tried to map the drive to a different drive name and then access, but still it ask again me username and the password. Bottomline, there are user name and password, but still it ask again me one. How to solve this problem?

    Hi fox55

    Thank you for using the Microsoft Answers Forums!

    Try this step and check if it helps to solve your problem:

    Password sharing is turned on.

    Password sharing is enabled by default for computers of working groups. When password sharing is enabled, people using other computers on your network cannot access your shared folders or printers unless they have a user account on your computer. There are two ways to enable file or printer sharing:

    Turn off password protected sharing. To turn off password protected sharing, follow these steps:

    2. open the network and sharing Center by clicking the Start button, clicking Control Panel, click network and Internet, click network and sharing Center.

    3. under sharing and discovery, click the arrow next to password protected sharing.

    4. click on turn off password protected sharing, and then click on apply. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation. Note: Password sharing is not available on computers that are on a domain.

    Also check this:

    Follow the steps to set password of the credentials under vacuum:

    Create a shortcut to (map) a network drive

    When you create a shortcut to a shared folder or computer on a network (also called mapping a network drive), you can get to it from the computer or the Windows Explorer without having to search or type its network address to each time.

    1. open the computer by clicking the Start button, click computer.

    2. click on map network drive.

    3. in the drive list, click a drive letter.

    4. you can choose any available letter.

    5. in the folder box, type the path of the folder or the computer, or click Browse to search for the folder or computer.

    6. to connect each time that you log on your computer, check Reconnect at logon .

    7. click on Finish.

    Your computer is now connected, or mapped, to the network drive.

    See this link for more information:

    http://Windows.Microsoft.com/en-us/Windows7/create-a-shortcut-to-map-a-network-drive

    Are there deposits in the router that blocks access? If there is, then try to turn it off and check if you can connect to an external hard drive. Go to this link:

    http://social.answers.Microsoft.com/forums/en-us/w7network/thread/cd2bfa3a-CEE8-4c38-93fd-608a5ec74b45

    After back and let us know if it helped to solve your problem.

    Thank you and best regards,

    R uma - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • yesternight I tried to improve my S5 iphone for a new virsion so at the end he asked me my icloud and the password I remember my password but not my icloud so I need your help please

    Yester night I tried to improve my S5 iphone for a new virsion so at the end he asked me my icloud and the password I remember my password but not my icloud so I need your help please.

    Seems that Apple has temporary problems with their activation servers. Many users report similar problem on older devices.

    Latest news: If you can not activate your iPhone, iPad, or iPod touch after installing iOS 9.3 - Apple Support

    r http://www.IMore.com/Apple-Working-iOS-93-Fix-Older-iPhone-iPad?utm_medium=Slide & utm_campaign = navigation & utm_source = im

    lder-IOS-devices-affected-by-bricking-bug/ http://9to5mac.com/2016/03/24/Apple-releases-New-Build-of-iOS-9-3-for-Users-of-o

    Hoppefully Apple will highlight the top soon.

  • request to help build a vi to acquire a signal of pc6251 for the acquisition of data and perform fft it can u people please help me? Thanks in advance

    Hi all... I learn LabVIEW since few days.i want to acquire a signal of pc6251 of acquisition of data and perform fft it can u people please help me? Thanks in advance

    If you do only use LabVIEW for a few days, you should get familiar with it first by looking at some of the resources available here. After that, you can watch heredata acquisition.

    After reviewing these documents, you can post back with any specific questions.

  • need help with hex and handling data extraction

    Hello

    I have able to transmit hexagonal commands on the serial port of my camera and receive responses in hex him successfully. I was able to confirm this by changing the display format to the spell for the control and the indicator. Now, I want to store the portion of the hexagonal received data and use it in my future orders. Example of received data as below:

    0001 1100 0010 E002 6 93 4D7E 2C4D AA66 F00D

    The red blocks will be incorporated in the next command so that when I sent this command it will look like this:

    F00D 0014 2000 0003 0000 0020 77AF E002 6 93 4D7E 2C4D

    In short, send the command and get response, extract and store data in red blocks, then send different control that contains the data that is stored. Everything is in hexadecimal format. Question is how can I extract/store the bytes wanted to and then rebuild a hex command containing these bytes? Can I convert it to normal string, byte array, or hexagonal table? If we use the latest methods of 2 conversion, I need to ensure that the zeros are not lost.

    I enclose my VI. Please take a look and help to provide a solution.

    Thanks in advance.

    Here, s what I had in mind (LabVIEW 2010):

  • I forgot my own computer admin and password... How to reset help pls

    I forgot my own computer admin and password... How to reset help pls

    Sorry, but we are not allowed to help you with that. Contact your local computer repairer and get them to break.

  • Date and time help for low Vision users

    I'm looking for a way to display the current time, date and day of the week on a computer screen in a really HUGE size.

    A member of my family has low vision, but with the help of the built-in Magnifier Windows 7 and other features of "accessibility", it still manages to use his computer, barely. However, it can read is no longer a clock, watch or calendar. As a result, it can easily lose track of time, date and even the day of the week. It is very disorienting for him.

    What they need is a program that responds to the touch of a button in arising of a display time, date and day of the week in a very large size on its screen. Ideally, the program would temporarily display this information in a large black print on a white background for a few seconds, after which it would disappear until he presses the button to make it appear again. Or it can be assigned to the screen until this that clicked with the mouse.

    I still think that a request to do this kind of thing may already exist, but I've not been able to find. The widget Windows Date and time, and the Gadgets are too small and contain too much information. All we need is a way to show a bare minimum of information:

    Monday
    July 4
    13:25

    Or something like that, but very large. The only required options are a way to specify the size of police and the duration of the display.

    Any suggestions? Thank you!

    -Jeff

    Your best bet would be to Google something like a clock on the screen for users with low vision.

    http://www.VisionAWARE.org/info/everyday-living/essential-skills/choosing-a-clock/125

  • In our Production, we can share the password of user of database 'Apps' with our consultants functional, although they would like to examine through fields by (help &gt; Diagnostics &gt; review) and here he asked the password of the user "APPS".

    In our Production, we can share the password of user of database 'Apps' with our consultants functional, although they would like to examine through fields by (help > Diagnostics > review) and here he asked the password of the user "APPS". We need to know the path where they can examine the field without knowing the password for user "apps".

    Check

    How to enforce password Protection to access the Menu help > Diagnostics > review? (Doc ID 1487534.1)

  • Hey guys, ive tryied buy photoshop like a hundret times, ive typed in my information payment and everything I need, went on the button pay on the accept button but nothing happened, I need help pls passing sry for my language

    Hey guys, ive tryied buy photoshop like a hundret times, ive typed in my information payment and everything I need, went on the button pay on the accept button but nothing happened, I need help pls passing sry for my language

    Contact adobe during the time pst support by clicking here and, when available, click on "still need help," http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • I can not install Lightroom 6 on my laptop using 8.1 to WIN.  The installer asks me to connect and when I do after 20 sec freezes the computer and the battery needs to restart.  This prevents the work online help.  What can I do?

    I can not install Lightroom 6 on my laptop using 8.1 to WIN.  The installer asks me to connect and when I do after 20 sec freezes the computer and the battery needs to restart.  This prevents the work online help.  What can I do?

    Settle in the right forum.

  • In Muse miniature slideshow container, I have images where data in image properties can be set. SEO search engines see the data and help the visibility of my site?

    In Muse miniature slideshow container, I have images where I can insert the data of image properties. SEO search engines see the data and help the visibility of my site?

    Post edited by: Howard Lower and rewrote the question because I have yet to get a response.

    Yes, they will be included in the report.

    Please check these links:

    https://helpx.Adobe.com/Muse/how-to/add-alt-text-and-ToolTips.html

    https://forums.Adobe.com/thread/1747973?start=0&TSTART=0

    Thank you

    Sanjit

  • can someone help pls. I would like to create a rectangle with a sharp angle and have no idea how.

    can someone help pls. I would like to create a rectangle with a sharp angle and have no idea how. the brown box, is I want what he's watching.1.png

    Use the direct selection (white arrow) to select the right angle lower (or higher) and drag it where you want it to be.

  • PLS-00307: too many statements - overloaded method w. the date and time stamp

    I ran in an overload situation but can't seem to find out exactly why the following error occurs:
    create or replace package pkg_overload
    as
      procedure overload(p_in in date);
      procedure overload(p_in in timestamp);
    end pkg_overload;
    /
    
    create or replace package body pkg_overload
    as
      procedure overload(p_in in date)
      as
      begin
        dbms_output.put_line('overload > date');
      end overload;
    
      procedure overload(p_in in timestamp)
      as
      begin
        dbms_output.put_line('overload > timestamp');
      end overload;
    end pkg_overload;
    /
    When I run the overloaded methods sysdate and systimestamp, I get an error on the timestamp:
    exec pkg_overload.overload(sysdate);
    
    overload > date
    
    exec pkg_overload.overload(systimestamp);
    
    Error starting at line 27 in command:
    exec pkg_overload.overload(systimestamp)
    Error report:
    ORA-06550: line 1, column 7:
    PLS-00307: too many declarations of 'OVERLOAD' match this call
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    It seems that Oracle is trying both the implicit conversion of the timestamp to date and no conversion, thus obtaining the error PLS-00307. Can anyone provide more insight in this? Is their still around him (in addition to creating a single method named timestamp procedure)?

    Thank you

    Martin
    -----
    http://www.talkapex.com
    http://www.clarifit.com

    SYSTIMESTAMP is a TIMESTAMP WITH time ZONE SCHEDULE. You must provide a separate overload for the TIMESTAMP WITH time ZONE SCHEDULE (and you'll probably want one for a setting of TIMESTAMP WITH time ZONE SCHEDULE LOCAL as well).

    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace package pkg_overload
      2  as
      3    procedure overload(p_in in date);
      4    procedure overload(p_in in timestamp);
      5    procedure overload(p_in in timestamp with time zone);
      6    procedure overload(p_in in timestamp with local time zone);
      7* end pkg_overload;
    SQL> /
    
    Package created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace package body pkg_overload
      2  as
      3    procedure overload(p_in in date)
      4    as
      5    begin
      6      dbms_output.put_line('overload > date');
      7    end overload;
      8    procedure overload(p_in in timestamp)
      9    as
     10    begin
     11      dbms_output.put_line('overload > timestamp');
     12    end overload;
     13    procedure overload(p_in in timestamp with time zone)
     14    as
     15    begin
     16      dbms_output.put_line('overload > timestamp with time zone');
     17    end overload;
     18    procedure overload(p_in in timestamp with local time zone)
     19    as
     20    begin
     21      dbms_output.put_line('overload > timestamp with local time zone');
     22    end overload;
     23* end pkg_overload;
     24  /
    
    Package body created.
    
    SQL> set serveroutput on;
    
    SQL> exec pkg_overload.overload( systimestamp );
    overload > timestamp with time zone
    
    PL/SQL procedure successfully completed.
    

    Justin

  • Help in the merging of data and create mailing labels

    I have a CSV file with three field ("name, envelope" "" = address"and"City ST Zip") and 245 records.

    I have the labels that correspond to seven on a page.

    I have the designed document. I am able to get the fields inserted, but... when I merge, I get the first page with seven the first record labels, the second page with seven second record labels, page 3 with seven third record labels. You get the photos. I want seven different addresses on each page. So... instead of having more to 35 245 pages.

    Is this possible or should I find a way to make my drawing in Word? * sigh *.

    Everyone made the same mistake; you set seven (records) to your InDesign document, are not.

    Create the first instance (upper-left)

    Go to control panel to merge the data and choose multiple records per page.

    It helps to have put guidelines in place for the Visual presentation and I try to keep the total area of my equal fields the number of hole - exactly 2 inches of width, for example.

    Data merge multiple records per page will need the values for spacing from room to room. Integers and guides make easier.

Maybe you are looking for

  • Laptop will not stop.

    My laptop 2 years w / El Capitan upgrade has been great to work for a long time. Now, it does not turn off. I reloaded the OS... any help. Now what?

  • When I transfer emails, why he sends a bunch of other things?

    When I send an email, all of the stuff below is included. I sometimes have this information on incoming emails as well. How can I stop this from happening? From:-Thursday 12 June at 11:06:03 2014X account key:account1X-UIDL:21320.Fd7ETNuNZV52eXzPORQh

  • I can't open links on Web sites. Any thoughts on how to fix it?

    Some links may be open, but others do not. I can tab links, but not all are available. I can't scroll up and down arrows on the right w, but have enter the bar and run it up and down. I can order things online, but usually cannot get to the cart to c

  • Create an exe to LAUNCH AN INSPECTION in VBAI

    Good day again NI Experts. I would like to ask for a solution to a small problem of mine in VBAI. By default, after you have saved a project VBAI, a file EXE will create for this project. When we re - open the EXE file, we will be directed straight t

  • Product key is not valid after the relocation because of the virus

    My netbook has a virus and I need to reinstall my windows xp.unfortunately my sticker is no longer legible, so I can't access my product key. One of my reinstallation cd told me that my product key is not valid... What do I do... i tried to call the