Today I exported a few pieces of data with SQL Server, and then inserted them into my machine, when the test data was used, at the beginning, export the CSV format file, and then, import from my computer, there are various errors, because there is a field in my database that stores data that is divided by commas, so it may be caused by this reason
I just need the data in this field, I can't do it, right-click, task, generate script, export the data of the entire table is 100m, but the data I need is only about 20, which is only about a few tens of kb,
Since I can export the data of the entire table, I can directly generate a table with the required data, the steps are as follows:
First, the SQL statement is as follows:
Then, a test1 table will be generated, which already contains the data we need, and then export the test1 table as follows:
After exporting it into a sql file, replace [test1] with the table name we need, as follows:
After the replacement is completed, copy the SQL statement and go to my native SQL analysis queryer, as follows, just execute! Successfully exported and inserted into my local database!
|