Share via

crash with one statement

Madsen, Ken 1 Reputation point
2022-01-17T18:59:40.147+00:00

I have a 7,173,684 character sql select statement and it crashes. I have searched for an upper limit to a single sql statement in SQL Server, but I cant find that upper limit

Plan B is to chop the statements in the largest size allowed. I have 24k select statements that have union all fragments gluing them into one statement

so:

select top1 expression from table where key = 'value' union all
select top1 expression from table where key = 'value' union all
select top1 expression from table where key = 'value' union all

...

I tried SSMS UI and Azure Data Studio

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


Your answer

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