An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
Why does Synapse On-Demand return same row counts when running queries with UNION ALL?
Valter Prykäri
126
Reputation points
In the second query, FIRSTROW is set to 2. Running these queries separately will return different counts, but running them in an UNION ALL query, the both values will be the same.
SELECT
count(*)
FROM
OPENROWSET(
BULK 'https://teststorage.dfs.core.windows.net/data/test.csv',
FORMAT = 'CSV',
PARSER_VERSION='2.0',
FIRSTROW = 1,
FIELDTERMINATOR = ';' ) as res
UNION ALL
SELECT
count(*)
FROM
OPENROWSET(
BULK 'https://teststorage.dfs.core.windows.net/data/test.csv',
FORMAT = 'CSV',
PARSER_VERSION='2.0',
FIRSTROW = 2,
FIELDTERMINATOR = ';') as res
Azure Synapse Analytics
Azure Synapse Analytics
Sign in to answer