I am trying to 'extract' if that is the correct word, a portion of a description for a field, please see example.
here's my simple statement:
select hla.LOG_ID,
to_char(hl.TIME_STAMP,'mm-dd-yy')Chg_Date,
history_log_api.Get_Description(hla.log_id)Part_Desc,
hla.OLD_VALUE,
hla.NEW_VALUE
from ifsapp.history_log_attribute hla,
ifsapp.history_log hl
where hla.LOG_ID = hl.log_id
IT LOOKS LIKE THIS...
LOG_ID CHANGE_DATE PART_DESC OLD_VALUE NEW_VALUE
568085 06-15-05 Sales Part Number: 22-1000, Site: 1000 14.37 19.74
568086 06-15-05 Sales Part Number: 22-1001, Site: 1000 14.37 19.74
568087 06-15-05 Sales Part Number: 22-1002, Site: 1000 14.37 19.74
568088 06-15-05 Sales Part Number: 22-1003, Site: 1000 14.37 19.74
568089 06-15-05 Sales Part Number: 22-1004, Site: 1000 7.17 19.74
568090 06-15-05 Sales Part Number: 22-1005, Site: 1000 7.17 19.74
From the description field I want to isolate the actual part number without all the other stuff so the field only says 22-1000 or 22-1001 etc...
here's my simple statement:
select hla.LOG_ID,
to_char(hl.TIME_STAMP,'mm-dd-yy')Chg_Date,
history_log_api.Get_Description(hla.log_id)Part_Desc,
hla.OLD_VALUE,
hla.NEW_VALUE
from ifsapp.history_log_attribute hla,
ifsapp.history_log hl
where hla.LOG_ID = hl.log_id
IT LOOKS LIKE THIS...
LOG_ID CHANGE_DATE PART_DESC OLD_VALUE NEW_VALUE
568085 06-15-05 Sales Part Number: 22-1000, Site: 1000 14.37 19.74
568086 06-15-05 Sales Part Number: 22-1001, Site: 1000 14.37 19.74
568087 06-15-05 Sales Part Number: 22-1002, Site: 1000 14.37 19.74
568088 06-15-05 Sales Part Number: 22-1003, Site: 1000 14.37 19.74
568089 06-15-05 Sales Part Number: 22-1004, Site: 1000 7.17 19.74
568090 06-15-05 Sales Part Number: 22-1005, Site: 1000 7.17 19.74
From the description field I want to isolate the actual part number without all the other stuff so the field only says 22-1000 or 22-1001 etc...