Azure SQL Database
An Azure relational database service.
6,343 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I received the below error in the Azure SQL database, I have 6 tables with the inner joins in the query and the last join is where I am using table1.column=CAST(table2.Column AS UNIQUEIDENTIFIER) and my query fails as soon as it runs. I checked the data and there are no bad data, I am excluding the rows that are not a GUID-like.
Please try joining them by converting both sides to NVARCHAR(36).
CAST(table1.column AS NVARCHAR(36)) =CAST(table2.Column AS NVARCHAR(36))