Normalizing a denormalized table with sql
537114May 16 2009 — edited May 16 2009Hi,
I have a de-normalized table with columns below.
RECORD_KEY COMPANY_CODE LOCATION_CODE MODEL_NUMBER WORK_ORDER SERIAL_NUMBER sEQUENCE_NUMBER CONFIRMED_DATE
UNIT_NUMBER TOTAL_OCCURRENCES STATUS_1 SUBSTATUS_1 US_DATE_1 STATUS_TIME_1 OPERATOR_ID_1
STATUS_COMPANY_1 STATUS_LOCATION_1 STATUS_PROCESS_FLAG_1 STATUS_2 SUBSTATUS_2 STATUS_DATE_2
STATUS_TIME_2 OPERATOR_ID_2 STATUS_COMPANY_2 STATUS_LOCATION_2 STATUS_PROCESS_FLAG_2
what i want to acheive is normalize the records and give them numbering in ascending order. The first record starts from STATUS_1 with its attributes and also a number as 1. The second record should have status_2 with its attributes and have a number 2
can we ahceive this with sql