これを MS SQL SERVER から MySQL に変換するにはどうすればよいですか?
/****** Object: StoredProcedure [dbo].[geolocation_refresh_geography] Script Date: 05/08/2012 22:02:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[geolocation_refresh_geography]
as
update locations
SET geolocation = geography::STPointFromText('POINT(' + CAST([Longitude] AS VARCHAR(20)) + ' ' + CAST([Latitude] AS VARCHAR(20)) + ')', 4326)
where geolocation is null
GO
コードの 4 行目でエラーが発生しています。理由がわかりません。
create procedure geolocation_refresh_geography()
BEGIN
update locations
SET geolocation = geography::STPointFromText('POINT(' + CAST(Longitude AS VARCHAR(20)) + ' ' + CAST(Latitude AS VARCHAR(20)) + ')', 4326)
where geolocation is null
END