SELECT TOP ( 1000 )
AddressStringId ,
HASHBYTES('SHA1', CONVERT(VARCHAR(12), AddressStringId)) AS Guid ,
HASHBYTES('SHA1', SearchString) AS UniqueHashString ,
OrganisationName AS LocationName ,
OrganisationName AS AddressLine1 ,
SubBuildingName AS AddressLine2 ,
'' AS AddressLine3 ,
BuildingNumber ,
BuildingName ,
StreetFirstPart + ' ' + StreetSecondPart AS Street ,
'' AS Locality ,
'England' AS AdministrativeArea ,
'' AS SubAdministrativeArea ,
PostTown AS Municipality ,
PostCode ,
'GB' AS Iso3166MinusOneCountryAlpha2Code ,
STR(Longitude, 25, 5) AS Longitude ,
STR(Latitude, 25, 5) Latitude ,
SearchString ,
3.0 AS PointBufferDistanceInMeters ,
--below are the output parameters in the stored procedure however SSIS doesn't seem to handle this. so passing 0 or null values for these parameters
ISNULL(ERROR_NUMBER(), 0) AS ErrorNumber ,
ISNULL(ERROR_SEVERITY(), 0) AS ErrorSeverity ,
ISNULL(ERROR_STATE(), 0) AS ErrorState ,
ISNULL(ERROR_PROCEDURE(), 0) AS ErrorProcedure ,
ISNULL(ERROR_LINE(), 0) AS ErrorLine ,
ISNULL(ERROR_MESSAGE(), '') AS ErrorMessage ,
0 AS InsertedRecords
FROM AddressStringSearch
WHERE AddressStringId IN (16855935,16855951,16856022,16856056,16856155,16856162,16856207,16856243,16856257,16856301,16856362,16856406,16856430,16856444,16856453,16856453,16856491,16856585
,16856602,16856623,16856650,16856680,16856687,16856701,16856703,16856758,16856809)
USE [Spaces]
GO
DECLARE @return_value int,
@ErrorNumber int,
@ErrorSeverity int,
@ErrorState int,
@ErrorProcedure nvarchar(128),
@ErrorLine int,
@ErrorMessage nvarchar(4000),
@NumberOfInsertedLocations INT
DECLARE @Wgs84Longitude1 AS FLOAT =CAST(LTRIM(RTRIM(' -2.15637')) AS FLOAT)
DECLARE @Wgs84Latitude1 AS FLOAT = CAST(LTRIM(RTRIM(' 57.26038')) AS FLOAT)
EXEC @return_value = [CrossContext].[USP_Locations_AddPointLocations]
@LocationGuid = 0x9F24EC0E32CD4ED6FC96B737D9CBD8FD4DFEA8E2,
@AddressStringId=16855951,
@LocationName = N'',
@AddressLine1 = N'',
@AddressLine2 = N'',
@AddressLine3 = N'',
@BuildingNumbers = N'10',
@BuildingName = N'',
@Street = N'BROOMHILL WAY',
@Locality = N'',
@Municipality = N'ABERDEEN',
@AdministrativeArea = N'England',
@SubAdministrativeArea = N'',
@PostalCode = N'AB21 0AA',
@Iso3166MinusOneCountryAlpha2Code = N'GB',
@Wgs84Longitude =@Wgs84Longitude1,
@Wgs84Latitude = @Wgs84Latitude1,
@PointBufferDistanceInMeters = 3.0,
@UniqueHashString = N'0xC6566F541E3CC5B2066541379CCA27F9EB522901',
@ErrorNumber = @ErrorNumber OUTPUT,
@ErrorSeverity = @ErrorSeverity OUTPUT,
@ErrorState = @ErrorState OUTPUT,
@ErrorProcedure = @ErrorProcedure OUTPUT,
@ErrorLine = @ErrorLine OUTPUT,
@ErrorMessage = @ErrorMessage OUTPUT,
@NumberOfInsertedLocations = @NumberOfInsertedLocations OUTPUT
SELECT @ErrorNumber as N'@ErrorNumber',
@ErrorSeverity as N'@ErrorSeverity',
@ErrorState as N'@ErrorState',
@ErrorProcedure as N'@ErrorProcedure',
@ErrorLine as N'@ErrorLine',
@ErrorMessage as N'@ErrorMessage',
@NumberOfInsertedLocations as N'@NumberOfInsertedLocations'
SELECT 'Return Value' = @return_value
GO
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
This award recognizes a member of Experts Exchange who has made outstanding contributions to the community within their first year as an expert. The Rookie of the Year is awarded to a new expert who has the highest number of quality contributions.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.