My question is about a field called contract_nm varchar2 (14). I need to get 3 different values from it, using a field to get a filter for the where clause.
Here is an example of data and how long the data can be, either 9, 10, or 11, but no more, at the moment it can be.
CONTRACT_NM LENGTH(CONTRACT_NM)
F.US.WZ10 9
F.US.WZ11 9
F.US.WZ12 9
F.US.RBZ10 10
F.US.RBZ11 10
F.US.RBZ12 10
F.US.ZWAZ10 11
F.US.ZWAZ11 11
F.US.ZWAZ12 11
etc
1) I need to display the last 3 characters of contract_nm.
2) Check the last 3 characters of contract_nm to see if the first letter is one of the following, then it would be that MONTH and the YEAR would be the next two letters, and DAY would default to the first day of the month. I need to display as a date because it is included in the date field.
Trade Months (Terms):
F January
G February
H March
J April
K May
M June
N July
Q August
U September
V October
X November
Z December
3) , , !!! contract_nm, (F.US.), 3 , Z11. 1 ( 9) 2 (10 ) 3 (11 ) , , . . 1 , , , 2 , 2- , "E" "A", "T" , , 1- . , 3 , 2 .
4) where, contract_nm, (F.US.), 3 , Z11. 1 ( 9) 2 (10 ) 3 (11 ) , , . . 2 , 2- , "E" "T" , , . , 3 , 3- , "E" "T" , , .