Skip to main content
se añadieron 130 caracteres en el cuerpo
Origen Enlace
update producto set Producto= concat(
    

(SELECT (case 
         when(ascii(substring(Producto,1,1))<=47 and ascii(substring(Producto,1,1))>=33) /*Caracteres como %*/
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,1,1))<=57 and ascii(substring(Producto,1,1))>=48) /*Numeros*/
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,1,1))<=90 and ascii(substring(Producto,1,1))>=65) /*Letras mayus */
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,1,1))<=122 and ascii(substring(Producto,1,1))>=97) /*letras minus*/
         then (char(floor(97+(rand()*25))))
         
         else substring(Producto,1,1) /*Si el caracter no esta como los espacios, los deja igual*/
                 
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,2,1))<=47 and ascii(substring(Producto,2,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,2,1))<=57 and ascii(substring(Producto,2,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,2,1))<=90 and ascii(substring(Producto,2,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,2,1))<=122 and ascii(substring(Producto,2,1))>=97)
         then (char(floor(97+(rand()*25))))
             
          else substring(Producto,2,1)
                 
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,3,1))<=47 and ascii(substring(Producto,3,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,3,1))<=57 and ascii(substring(Producto,3,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,3,1))<=90 and ascii(substring(Producto,3,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,3,1))<=122 and ascii(substring(Producto,3,1))>=97)
         then (char(floor(97+(rand()*25))))
          
         else substring(Producto,3,1)
         
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,4,1))<=47 and ascii(substring(Producto,4,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,4,1))<=57 and ascii(substring(Producto,4,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,4,1))<=90 and ascii(substring(Producto,4,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,4,1))<=122 and ascii(substring(Producto,4,1))>=97)
         then (char(floor(97+(rand()*25))))
             
         else substring(Producto,4,1)
                 
        end)
)
   
    
);
update producto set Producto= concat(
    

(SELECT (case 
         when(ascii(substring(Producto,1,1))<=47 and ascii(substring(Producto,1,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,1,1))<=57 and ascii(substring(Producto,1,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,1,1))<=90 and ascii(substring(Producto,1,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,1,1))<=122 and ascii(substring(Producto,1,1))>=97)
         then (char(floor(97+(rand()*25))))
         
         else substring(Producto,1,1)
                 
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,2,1))<=47 and ascii(substring(Producto,2,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,2,1))<=57 and ascii(substring(Producto,2,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,2,1))<=90 and ascii(substring(Producto,2,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,2,1))<=122 and ascii(substring(Producto,2,1))>=97)
         then (char(floor(97+(rand()*25))))
             
          else substring(Producto,2,1)
                 
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,3,1))<=47 and ascii(substring(Producto,3,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,3,1))<=57 and ascii(substring(Producto,3,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,3,1))<=90 and ascii(substring(Producto,3,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,3,1))<=122 and ascii(substring(Producto,3,1))>=97)
         then (char(floor(97+(rand()*25))))
          
         else substring(Producto,3,1)
         
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,4,1))<=47 and ascii(substring(Producto,4,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,4,1))<=57 and ascii(substring(Producto,4,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,4,1))<=90 and ascii(substring(Producto,4,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,4,1))<=122 and ascii(substring(Producto,4,1))>=97)
         then (char(floor(97+(rand()*25))))
             
         else substring(Producto,4,1)
                 
        end)
)
   
    
);
update producto set Producto= concat(
    

(SELECT (case 
         when(ascii(substring(Producto,1,1))<=47 and ascii(substring(Producto,1,1))>=33) /*Caracteres como %*/
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,1,1))<=57 and ascii(substring(Producto,1,1))>=48) /*Numeros*/
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,1,1))<=90 and ascii(substring(Producto,1,1))>=65) /*Letras mayus */
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,1,1))<=122 and ascii(substring(Producto,1,1))>=97) /*letras minus*/
         then (char(floor(97+(rand()*25))))
         
         else substring(Producto,1,1) /*Si el caracter no esta como los espacios, los deja igual*/
                 
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,2,1))<=47 and ascii(substring(Producto,2,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,2,1))<=57 and ascii(substring(Producto,2,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,2,1))<=90 and ascii(substring(Producto,2,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,2,1))<=122 and ascii(substring(Producto,2,1))>=97)
         then (char(floor(97+(rand()*25))))
             
          else substring(Producto,2,1)
                 
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,3,1))<=47 and ascii(substring(Producto,3,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,3,1))<=57 and ascii(substring(Producto,3,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,3,1))<=90 and ascii(substring(Producto,3,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,3,1))<=122 and ascii(substring(Producto,3,1))>=97)
         then (char(floor(97+(rand()*25))))
          
         else substring(Producto,3,1)
         
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,4,1))<=47 and ascii(substring(Producto,4,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,4,1))<=57 and ascii(substring(Producto,4,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,4,1))<=90 and ascii(substring(Producto,4,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,4,1))<=122 and ascii(substring(Producto,4,1))>=97)
         then (char(floor(97+(rand()*25))))
             
         else substring(Producto,4,1)
                 
        end)
)
   
    
);
Origen Enlace

update producto set Producto= concat(
    

(SELECT (case 
         when(ascii(substring(Producto,1,1))<=47 and ascii(substring(Producto,1,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,1,1))<=57 and ascii(substring(Producto,1,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,1,1))<=90 and ascii(substring(Producto,1,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,1,1))<=122 and ascii(substring(Producto,1,1))>=97)
         then (char(floor(97+(rand()*25))))
         
         else substring(Producto,1,1)
                 
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,2,1))<=47 and ascii(substring(Producto,2,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,2,1))<=57 and ascii(substring(Producto,2,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,2,1))<=90 and ascii(substring(Producto,2,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,2,1))<=122 and ascii(substring(Producto,2,1))>=97)
         then (char(floor(97+(rand()*25))))
             
          else substring(Producto,2,1)
                 
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,3,1))<=47 and ascii(substring(Producto,3,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,3,1))<=57 and ascii(substring(Producto,3,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,3,1))<=90 and ascii(substring(Producto,3,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,3,1))<=122 and ascii(substring(Producto,3,1))>=97)
         then (char(floor(97+(rand()*25))))
          
         else substring(Producto,3,1)
         
        end)
),
    
    (SELECT (case 
         when(ascii(substring(Producto,4,1))<=47 and ascii(substring(Producto,4,1))>=33)
         then (char(floor(33+(rand()*14))))
         
         when(ascii(substring(Producto,4,1))<=57 and ascii(substring(Producto,4,1))>=48)
         then (char(floor(48+(rand()*10))))
         
         when (ascii(substring(Producto,4,1))<=90 and ascii(substring(Producto,4,1))>=65)
         then (char(floor(65+(rand()*25))))
         
         when (ascii(substring(Producto,4,1))<=122 and ascii(substring(Producto,4,1))>=97)
         then (char(floor(97+(rand()*25))))
             
         else substring(Producto,4,1)
                 
        end)
)
   
    
);

Esto de puede Servir, distingue si es mayúsculas, minúsculas y caracteres como %, respetando los espacios. Solo cambia los primero 4 caracteres pero es para que se tenga una idea.