Dropping existing Primary key ALTER TABLE [TABLE1] DROP CONSTRAINT [ pkPartIdPartRevTestCode ] Creating New Primary key ALTER TABLE [TABLE1] ADD CONSTRAINT pkPartIdTestIdSupplierCode PRIMARY KEY (PartId, TestCodeId, SupplierCode);
🛠 Steps in SSIS to Get Distinct Part Numbers from Excel Add an Excel Source : In your Data Flow Task, drag an Excel Source . Configure it to point to your Excel file. Select the sheet or named range that contains the part numbers. Add a Sort Transformation : Drag a Sort Transformation into the Data Flow. Connect the Excel Source to the Sort. In the Sort editor: Check the box for the Part Number column. Check Remove rows with duplicate sort values — this will give you distinct part numbers. Add a Destination : Drag a destination (e.g., Flat File Destination , OLE DB Destination , etc.). Connect the Sort output to the destination. Configure the destination to store the distinct part numbers. Run the Package : Execute the package to extract and store the distinct part numbers.