This article outlines the steps to generate, clean, and import UPS shipment data from iDrive into SQL Server Management Studio (SSMS).
1. Generate CSV Report
- Access iDrive Audit.
- Generate the CSV report based on Ship Date (at least three full weeks back).
- e.g.
2. Prepare CSV File
- Open the generated CSV file.
- Filter out long strings in the ‘Service’ column:
- In E2, apply the formula:
=LEFT(F2,40). - Copy the formula down the entire column.
- Copy the entire E column and paste values over column F.
- Rename the header of F to ‘Service’.
- Delete Column E.
- In E2, apply the formula:
- Remove unnecessary columns:
- Delete columns O → Q and U → AH (removes invalid characters).
- Save and close the file (it must be closed before import).
3. Import Data into SQL Server
- Open SQL Server Management Studio 19 (SSMS).
- Connect to
RSI-SQL1-PRODserver. - Open RSI_Live under Databases.
- Go to File → Open → File and browse to UPS iDrive Queries.
- Delete old records:
- Run the highlighted query to delete records from the selected date range:

- Replace
'2024-11-01'with the start date of the current report. - Highlight the query and click Execute.
4. Import the CSV File
- Right-click RSI_Live → Tasks → Import Data.
- Choose Flat File Source as the import method.
- Browse to the CSV file.
- Select SQL Server Native Client as the destination.
- Change destination table to
RSI_iDrive_UPS_Shipments. - Review for changed/invalid columns using the Edit Mapping button.
Final Steps
- Verify the imported data to ensure accuracy.
- If errors occur, check the formatting and special characters in the CSV file.
This process ensures that UPS shipment data is properly cleaned and imported into the database for reporting.



