I have two sets of data (locations) in seperate tables and I need to compare if they match or not. I have a UDF which performs a calculation based upon 5 values from each table.
How do I perform a select with a join using this udf?
my udf is basically defined by....
ALTER FUNCTION [dbo].[MatchRanking]
(
@Latitude FLOAT
, @Longitude FLOAT
, @Postcode VARCHAR(16)
, @CompanyName VARCHAR(256)
, @TelephoneNumber VARCHAR(32)
, @Latitude2 FLOAT
, @Longitude2 FLOAT
, @Postcode2 VARCHAR(16)
, @CompanyName2 VARCHAR(256)
, @TelephoneNumber2 VARCHAR(32)
)
RETURNS INT