hello I have a table that has no identity on its pk (since it is generated through a program that fills the table). I must enter records from another table, but I need a function to generate this id. I have the following insert to add the data.
insert into movctble (movctbleid, MovctbleGlosa,MovctbleFecha,MovctbleEstado,MovctbleUserId,MovctbleUpdFhora,MovctbleClienteId)
select liquidadescripcion, liquidafecha, liquidaestado, 0, liquidafecha, liquidacuenta from XAsientosFaltantes
but I'm missing the first field. How can I generate this number automatically? Greetings