Start SSMS.
SSMS will ask which server you want to connect to and how you want to connect. Be sure to use these values:
Server type: Database Engine
Server name: JXE-DB01
Authentication: Windows Authentication
Your username will be filled in for you and cannot be changed.
In the Object Explorer on the left side, right-click on JXE-DB01 and select New Query.
Paste the below query into the query window.
USE [PriceFileProcessingHelper];
DECLARE @ImportFilename varchar(255) = 'C:\PriceFiles\JXEnterprises\CP_26765.csv';
DECLARE @PriceFile varchar(50) = 'CP_03022021';
EXEC [PriceFileProcessingHelper].[dbo].[spIN_PIN_PriceUpdate_GetMatchInfo] @ImportFilename, @PriceFile;
Update the 2 variables (@ImportFileName and @PriceFile) to the correct values for the desired price file which has already been imported.
Press F5 to execute query.
The time it takes the query to run depends on the size of the file and what else is going on. The above example runs in about 5 minutes.
Once complete, you will have 3 result sets in the results tab, below the query.
The first result set is a list of the non-matching parts.
The second result set is a list of the matching parts.
The third result set is a one-line summary of the price file.
You can copy the results two different ways.
First way:
Right-click on the result set.
Select Save Results As…
Enter a filename and click Save to save the file.
Second way:
Click on result set.
Type Ctrl-A to select all cells.
Right-click in result set and select Copy with Headers.
Paste into your favorite spreadsheet application.
This query does not update anything, so you can run it multiple times.
If you aren’t sure of the exact values it wants for the @ImportFileName and @PriceFile variables, you can run the below query to see the last 15 price files imported.
SELECT TOP 15
PriceFileID,
PriceFile,
ImportFilename,
PriceFileCreationDate
FROM
[ProfitMaster].[dbo].[PriceFile]
ORDER BY
PriceFileCreationDate DESC;