Forum Discussion
sebflaesch67
Jan 07, 2026Copper Contributor
SQL Server 2025 VECTOR functions accepting JSON array strings
Hello! Playing with new VECTOR type and functions, I can read following https://learn.microsoft.com/en-us/sql/t-sql/functions/vector-distance-transact-sql?view=sql-server-ver17 for vector parameters...
carlwalk
Jan 20, 2026Copper Contributor
In SQL Server 2025, the new VECTOR functions like VECTOR_DISTANCE work only with actual VECTOR values. You can store a JSON array string in a VECTOR column because SQL Server can convert it when inserting, but the functions won’t automatically convert a JSON string to a VECTOR when you use it. You need to explicitly cast the JSON array to VECTOR first for the functions to work. Essentially, JSON arrays don’t magically become vectors you have to tell SQL Server to treat them that way.