0
I exported a Sqlite data record to Sql Server with Dump. I need to take these records and insert them into a new table that I created to receive these records within my database in Sql server. The problem is that I have many lines to insert.There are over 1,000 lines and I wonder if there is a simpler way to do this than to repeat 1000 times the Insert into nameDaTable values...
ex:
INSERT INTO MyTable VALUES ("John", 123, "Lloyds Office");
INSERT INTO MyTable VALUES ("Jane", 124, "Lloyds Office");
INSERT INTO MyTable VALUES ("Billy", 125, "London Office");
INSERT INTO MyTable VALUES ("Miranda", 126, "Bristol Office");
INSERT INTO MyTable VALUES ("John", 123, "Lloyds Office");
INSERT INTO MyTable VALUES ("roger", 23, "Nuvens");
INSERT INTO MyTable VALUES ("jose", 500, "London Office");
INSERT INTO MyTable VALUES ("elanda", 126, "Paris");
Let’s imagine that these Insert have more than 1,000 Is there a way to make it easier without repeating 1,000 times?
Don’t get it, you have the sql lite dump with the Insert or not?
– rray
Where does the information come from? Excel? Another table?
– Edgar Muniz Berlinck
These records were in sqlite.We made a conversion to sql server. needed to create a database in sql server and save that data that was in Sqlite within Sql server. @rray
– Gladiador
put how the data is currently, whether csv or xml
– Rovann Linhalis
takes advantage that is in Notepad++ and makes a macro changing the text to your need, simpler...
– Rovann Linhalis
@Rovannlinhalis a macro?? did not understand what is sorry rsrs.
– Gladiador
Do you have sql management (ssms) installed? don’t just copy these paste Inserts and give an F5 to run them all at once?
– rray
got it...yes I could up but have to insert one more Covert(varbinary(max) to convert image so I did right not to have more work after.so I must do this for all lines
– Gladiador
@rray I want to believe that this is the sqllite dump and is with structure other than sql server, it is not possible... rs Gladiador... use macros in np++ : https://www.youtube.com/watch?v=xQaxDeCwMRg
– Rovann Linhalis
I can understand the problem better ... if you want to put this function on top of some value you can try using the np++ column mode or a little regex :D
– rray
@Rray saved my day man hahaha worth.
– Gladiador
@Rovannlinhalis now understood what you meant by Macro on Notepad++ this also worked well that gives a little work.THANKS for helping, it was even worth!!
– Gladiador
dispo. Do not forget to post how your problem was solved to close the issue
– Rovann Linhalis