The invoice number is characters and numbers combined but I want to change these to numerical only in SQL The invoice number is characters and numbers combined but I want to change these to numerical only in SQL.

I want like this CC/DDD/1, CC/DDD/2 .... n
To answer your question, I did the following (all of the steps shown below are in the fiddle here).

First part - if you wish to keep the old invoice numbers:

Construct and populate the table:

CREATE TABLE invoice 
(
  invoice_id VARCHAR (100) NOT NULL
);


INSERT INTO invoice 
VALUES
('CC/DDD/2018-2019/3'),
('CC/DDD/2018-2019/6'),
('CC/DDD/2018-2019/7'),
('CC/DDD/2018-2019/9'),
('CC/DDD/2018-2019/12'),
('CC/DDD/2018-2019/23'),
('CC/DDD/2018-2019/27'),
('CC/DDD/2018-2019/122222'),  -- The large numbers are for testing of sorting,
('CC/DDD/2018-2019/244444');  -- thanks to @DougDeden for pointing out problems in this area


I'll step through the logic I used.

SELECT CHARINDEX('/', REVERSE(invoice_id)) AS cutoff FROM invoice;


Result:

cutoff
2
2
2
2
3
3
3
7
7


Get the REVERSE of the string along with the CHARINDEX of / and then obtain the position of the first slash (/) which tells us where the number of interest lies.

Then, I ran:

SELECT 
  LEFT(REVERSE(invoice_id), CHARINDEX('/', REVERSE(invoice_id)) - 1) AS the_num
FROM invoice;


Result:

the_num
3
6
7
9
21
32
72
222221
444442 -- note original is 24444


The LEFT function gives us the actual number to be suffixed (added) to the invoice.

Finally, I ran:

SELECT SUBSTRING(invoice_id, 1, 7) 
        + REVERSE(LEFT(REVERSE(invoice_id), 
          CHARINDEX('/', REVERSE(invoice_id)) - 1)) AS new_invoice_id
FROM invoice
ORDER BY -- CAST(new_invoice_id AS INTEGER);  -- try this more elegant but it doesn't work!
  CAST(REVERSE(LEFT(REVERSE(invoice_id), CHARINDEX('/', 
                    REVERSE(invoice_id)) - 1)) AS INTEGER);


Result:

new_invoice_id
CC/DDD/3
CC/DDD/6
CC/DDD/7
CC/DDD/9
CC/DDD/12
CC/DDD/23
CC/DDD/27
CC/DDD/122222
CC/DDD/244444


Note that in order to obtain the correct result, it is necessary to REVERSE back the original one, not very elegant, but these functions are quite performant. Thanks to @DougDeden for pointing out an error in the original answer!  

As mentioned above, all of this is in the fiddle here.

Second part - if you wish to renumber the invoices:

@Lennart proposes a simultaneous renumbering, so for completeness, I'm adding a similar solution to my answer. The first steps are the same as above - the SQL does become a bit cumbersome, but it can be done as follows - first, to obtain the new numbers:

SELECT 
  REVERSE(LEFT(REVERSE(invoice_id), CHARINDEX('/', REVERSE(invoice_id)) - 1)) AS the_num,
  ROW_NUMBER() 
    OVER (ORDER BY CAST(REVERSE(LEFT(REVERSE(invoice_id), CHARINDEX('/', REVERSE(invoice_id)) - 1)) AS INTEGER))
    AS new_number
FROM invoice
ORDER BY 
  CAST(REVERSE(LEFT(REVERSE(invoice_id), CHARINDEX('/', 
            REVERSE(invoice_id)) - 1)) AS INTEGER);


Result:

the_num new_number
3       1
6       2
7       3
9       4
12      5
23      6
27      7
122222  8
244444  9


Be very careful when sorting - if you sort INTEGERs as VARCHARs, the results are anomalous - basically, sorting INTs as strings means that the "numbers" are sorted by the first digit, so 32, 332 and 45 will sort as 32, 332 and 45 and not 32, 45, 332.

So, now we have our renumbering - a final step is necessary:

SELECT 
  SUBSTRING(invoice_id, 1, 7) +
  CAST(ROW_NUMBER() 
    OVER (ORDER BY CAST(REVERSE(LEFT(REVERSE(invoice_id), CHARINDEX('/', 
                        REVERSE(invoice_id)) - 1)) AS INTEGER)) AS VARCHAR)
  AS invoice_no
FROM invoice
ORDER BY 
  CAST(REVERSE(LEFT(REVERSE(invoice_id), CHARINDEX('/', 
           REVERSE(invoice_id)) - 1)) AS INTEGER);


Notice the CAST of the ROW_NUMBER() - if this is not done, an error is thrown Msg 8114 Level 16 State 5 Line 1 Error converting data type varchar to bigint. You can't "add" an INTEGER to a string!

Result:

invoice_no
CC/DDD/1
CC/DDD/2
CC/DDD/3
CC/DDD/4
CC/DDD/5
CC/DDD/6
CC/DDD/7
CC/DDD/8
CC/DDD/9


As mentioned in the comments, this renumbering is probably not a good idea as it will require the maintenance of a correspondance between the old invoice numbers and the new invoice numbers. All of these steps above are shown in the fiddle here.