Good afternoon, I am trying to insert records from a Cursor into a table in SQL but constructing the Insert statement in a text type variable.
Within the values I have a field of integer type, several texts and a date, apparently I am with some complications in the armed, suddenly I can give a light about it.
What I want to build is something like this:
set @queryTexto = 'Insert into <<tabla>> (<<lista de campos>>) Values (@campoNumerico, @campo1, @campo2, @campo3, ''ACT'', @campoFecha)' exec @queryTexto
I have seen in some examples that you have to convert values, I have also seen the use of
What recommendations could you give me?
Thank you very much.