-2
I’m performing a table transfer "Histo_Ficha_Controle
" for "Cad_Espec_Teste
". The two tables contain the same fields to receive the information. When copying from one table to another, I would like to know if it is possible to insert a value into one of the columns.
insira o código aqui
String query1 = "INSERT INTO Cad_Espec_Teste (ORDEM,ESP_LINHA ,ESP_MATERIAL ,ESP_TESTE ,ESP_EQUIPAMENTO ,MINIMO ,MAXIMO ,UNID_MEDIDA ,TEXTO ,REFERENCIA ,FREQUENCIA ,"
+ "UNID_FREQUENCIA,PRODUTO ,ORIGEM ,TIPO_ESPEC ,ESPEC_COMPLETO ,FREQ_COMPLETO ,LAB ,COMPLEMENTO,RESPONSAVEL_ALTER,PENDENCIA_ALTER ,DATA_ALTER,OBSERVACAO_ALTER,"
+ "DATE_VALIDE_ALTER,ALTER_IDENTIFICACAO) SELECT ORDEM,HISTO_LINHA,HISTO_MATERIAL,HISTO_TESTE,HISTO_EQUIPAMENTO,HISTO_MINIMO,HISTO_MAXIMO,"
+ "HISTO_UNID_MEDIDA,HISTO_TEXTO,HISTO_REFERENCIA,HISTO_FREQUENCIA,HISTO_UNID_FREQUENCIA,HISTO_PRODUTO,HISTO_ORIGEM,HISTO_TIPO_ESPEC,HISTO_ESPEC_COMPLEMENTO,"
+ "HISTO_FREQ_COMPLETO,HISTO_LAB,HISTO_COMPLEMENTO,HISTO_RESPONSAVEL,HISTO_PENDENCIA,HISTO_DATA_HISTO,HISTO_OBSERVACAO,HISTO_DATE_VALID,"
+ "ALTER_IDENTIFICACAO FROM Histo_Ficha_Controle WHERE HISTO_MATERIAL='" + txt_perfil.getText() + "' and HISTO_DATA_HISTO='"+txt_data.getText()+"'";
This is the String I’m using to transfer a jtable
to another and would like to insert the following value: "Version Change" in the column "PENDENCIA_ALTER"
Your doubt remains obscure. You don’t provide enough data to analyze what you need to know, this string doesn’t collaborate on virtually anything in understanding the problem. Provide more relevant code to better understand the problem
– user28595
And you don’t need to copy an entire table to another, in case
JTable
, if you want the same data in two different tables, to replicate or use the sameTableModel
for both of us.– user28595
As you can see I have 2 tables, a call Histo_ficha_control that in the case is my table of History and the other and Cad_espec_teste .. when I make a change to Cad_espec_teste table information, I save a copy in History.. in this case I am bringing an old version to replace the current one and for this I am putting a status in pendencia to be visualized.
– GabrielBispo
So it would be interesting to add this explanation to the question too, because it gave to better understand the problem through it.
– user28595