Your syntax for OPENROWSET looks more then strange (wrong), see https://learn.microsoft.com/en-us/sql/t-sql/functions/openrowset-transact-sql?view=sql-server-ver16 for the correct syntax.
Query completed with errors
SELECT * FROM OPENROWSET(BULK 'Database', FORMAT = 'SSTREAM', PARSER_VERSION = '2.0') AS [result] WHERE ([UrlRecordId] = 'xxxxxx');
Hi all, I am running a query, and it is completed with errors as shown in the image, but when I open the error messages, they are empty. Is there any way to investigate the error message or check the logs?
3 answers
Sort by: Most helpful
-
-
-
AH 5 Reputation points
2024-03-01T13:11:28.64+00:00 The keyword "SSTREAM" doesn't appear to be a valid format option. Perhaps you meant "SINGLE_CLOB" or "SINGLE_NCLOB" if you're dealing with character or national character large objects respectively.
"Database" should be replaced with the actual file path or URI pointing to the database you want to access.
[UrlRecordId] = 'xxxxxx' looks like you're filtering based on a specific value. You should replace 'xxxxxx' with the actual value you want to filter on.
Here's a revised version of your query assuming you're working with character large objects and replacing 'xxxxxx' with an actual value:
sqlCopy code SELECT
Make sure to replace
'C:\path\to\your\database_file'
with the actual path or URI of your database file, and'your_actual_value'
with the value you're filtering on. Additionally, ensure that the SQL Server configuration allows for using OPENROWSET for accessing external data sources.