Query completed with errors

Dandala Kartheek (MINDTREE LIMITED) 0 Reputation points Microsoft Vendor
2024-03-01T12:59:44.8966667+00:00
SELECT * FROM OPENROWSET(BULK 'Database', FORMAT = 'SSTREAM', PARSER_VERSION = '2.0') AS [result] WHERE ([UrlRecordId] = 'xxxxxx');

image

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?

Azure SQL Database
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,858 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 44,296 Reputation points
    2024-03-01T13:06:37.12+00:00

    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.


  2. AH 5 Reputation points
    2024-03-01T13:10:43.5666667+00:00

    sorry, double reaction


  3. 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.