@steveatsafe
Good morning,
I am having issues with writing to our Azure Database. We have a bunch of features that have correlating Ids. The objective is to find the latest and greatest feature(s) based on a uuid that is assigned to each feature and the features that relate to it.
The SQL query I wrote before worked up until now. Now I receive this error message
"com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting from a character string to uniqueidentifier."
Unsure why all of sudden this is happening.
DECLARE @aprt_id INT = $(Arpt_ID), @address_id UNIQUEIDENTIFIER;
;WITH idetails AS
(
SELECT *, ROW_NUMBER() OVER (PARTITION BY venue_id ORDER BY record_id DESC) AS recency
FROM airport
WHERE ARPT_ID = @arpt_id
)
SELECT @address_id = address_id FROM idetails WHERE recency = 1;
SELECT *
FROM airport, dbo.[building] as building, dbo.[utility_pipe] as utility_pipe
WHERE airport.[address_id] = @address_id AND building.[address_id] = @address_id AND building.[arpt_id] = $(Arpt_ID) AND building.[building_id]=$(Bldg_ID) AND building.[id] = utility_pipe.[building_id]
Any assistance would be great!
Thanks!
David