I would like to know most efficient and secure way to replace some numbers. In my table i have two columns: Nummer and Vater
. In Nummer
column i store articles numbers. The one with .1
at the end is the 'main
' article and rest are his combinations
(sometimes main article doesn't contain combinations). Numbers consist of 3-parts separated by 3 dots (always). Vater for all of them is always main article number as shown below:
Nummer | Vater
-------------------------------
003.10TT032.1 | 003.10TT032.1
003.10TT032.2L | 003.10TT032.1
003.10TT032.UY | 003.10TT032.1
Nummer column = varchar
Vater column = varchar
I want to have possibility to change first 2 parts n.n
For example i want to say and send via sql query that i want to replace to: 9.4R53
Therefore based on our example the final results should be as follows:
Nummer | Vater
----------------------
9.4R53.1 | 9.4R53.1
9.4R53.2L | 9.4R53.1
9.4R53.UY | 9.4R53.1
Hope this is clear.