A cast checks the count of numbers, not the model they came from. Here is a simple staging pattern that loads good rows and reports the rest.
JSON_OBJECT and JSON_ARRAY: Building JSON in SQL Server 2022
Build JSON_OBJECT and JSON_ARRAY values in SQL Server 2022, control null handling, nest arrays, and compare rowset and aggregate output.
Querying Nested JSON Arrays With OPENJSON
Query nested JSON arrays with OPENJSON, preserve element positions, pass inner arrays with AS JSON, and handle missing or strict paths.
Indexing JSON Properties With Computed Columns
Improve indexing JSON properties with typed computed columns, matching paths, required SET options, and plan checks on your workload.
The Native JSON Data Type in SQL Server 2025
Use the JSON data type in SQL Server 2025, reject invalid documents, read and change properties, and choose where relational columns fit.
Reading a JSON Lines File Into a Table With OPENROWSET
Load JSON Lines with OPENROWSET BULK, keep UTF-8 text intact, quarantine invalid objects, and insert validated typed rows.
Key-Value and Document Databases: When Each One Fits
Key-Value and Document Databases are two NoSQL models. One finds a value by its key, the other stores a whole JSON document you can query by any field. This post shows when each one fits and builds both patterns in SQL Server 2025 with a key-value table and the json data type.







