Summary
The article discusses about how to perform a bulk insert into the database table using the Sql Scripts view.Synopsis
The article discusses about how to perform a bulk insert into the database table using the Sql Scripts view.
Discussion
Say the data file which will be used to perform the bulk insert is going to be installed to the Installation directory of the setup. In that case, follow the steps below:
For InstallScript MSI and Basic MSI projects:
- In the 'Sql Scripts' view on the 'Installation Designer' tab, create a Sql Connection and a Sql Script.
- On the Scripts tab for the 'Sql Script', enter the script in following manner ?
BULK INSERT TABLE_NAME
FROM 'InstallationPathFILENAME'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
3. In the above query, the TABLE_NAME will be the table, in which you want to perform the bulk insert; FILENAME will be the data file like data.csv, which you are installing with the setup.
4. On the ?Text Replacement? Tab, replace InstallationPath with [INSTALLDIR], since the data file will be installed in the Installation directory.
For InstallScript projects:
1. Steps 1-3 above will remain the same.
2. On the ?Text Replacement? Tab, replace InstallationPath with TARGETDIR since the data file will be installed in the Installation directory.
Additional Information
For more information on the Sql Scripts view, visit this link -> http://helpnet.flexerasoftware.com/installshield16helplib/SQLServer.htmRelated Articles
How to retrieve and execute the SQL query used by a saved custom report 55Number of Views Configuring AdminStudio to automatically connect to SQL Database using Windows Authentication 8Number of Views SQL script to check the database permissions for LicenseManagerUser 130Number of Views Inventory Adapter Studio installations on standalone beacons cannot connect to source databases using SQL Authentication 7Number of Views Use a SQL script to accept asset links in bulk 8Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago