...
The text of the spCheckForVehicleModelMatch stored procedure appears below but you can also find it in the Database Objects service if you installed the sample application.
...
spCheckForVehicleModelMatch
(@SourceID INT,
@Year INT,
@Name NVARCHAR(255),
@ManufacturerID INT)
AS
SELECT MatchType, ID FROM
(SELECT MatchType
= CASE
WHEN
(Year = @Year AND
Name = @Name AND
ManufacturerID = @ManufacturerID AND
ID <> @SourceID)
THEN
1
WHEN
(Name = @Name AND
ManufacturerID = @ManufacturerID AND
ID <> @SourceID)
THEN
2
END,
ID FROM APTIFY..vwVehicleModels) VehicleModelMatch
WHERE MatchType IS NOT NULL |
Related topics
Filter by label (Content by label) |
---|
showLabels | false |
---|
sort | title |
---|
showSpace | false |
---|
labels | duplicate-records |
---|
|