SYMPTOMS
If you need to export or import data from the temporary table you can use the scripts described in this article.
CAUSE
Not applicable.
RESOLUTION
Execute the script and adjust is based on the specifc matter setting that you want to apply.
Example based on a matter referred to as: M_0003.
[ZyLABLegalReview].[dbo].[M_0003_TEMP]
Export script:
@rem Export
set queryOrTable=[LegalReview].[dbo].[M_0003_TEMP_XX]
set sqlComputerName=zynl0891
@rem export from TempTable to export.out
bcp %queryOrTable% out export.out -N -T -S%sqlComputerName%
(It is faster and more reliable to use an export/import script file rather than SQL management studio)
The binary Data field is represented in ANSI format and can be searched for string values.
To import the contents of the file to a temp table you can use:
Import script:
@rem Import
set tableNameToImportDataTo=[LegalReviewDev].[dbo].[M_0003_TEMP_XX]
set sqlComputerName=mycomputer
@rem import to tepmtable
bcp %tableNameToImportDataTo% in export.out -N -T -S%sqlComputerName%
In addition:
- Please note that both scripts are using a trusted connection (-T)
- In order to get more information on bcp use bcp /?
- The Microsoft bcp utility bulk copies data between an instance of Microsoft SQL Server and a data file in a user-specified format.
- The utility can be used to import large numbers of new rows into SQL Server tables or to export data out of tables into data files.
APPLIES TO
3.6; 3.7
Comments
0 comments
Article is closed for comments.