'Switching Partitions

Is it possible to switch more than one partition at once with one query?

I have 700 partitions in a table that I want to switch to its corresponding table with one query.
I tried writing this query

DECLARE @num INT = 1

WHILE @num <= 700

BEGIN

ALTER TABLE SourceTable

SWITCH TO DestinationTable PARTITION @num  
SET @num = @num +1

END  


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source