OPEN partitions FETCH NEXT FROM partitions INTO @instancePartition, @relationshipPartition WHILE @fetch_status = 0 BEGIN ...

'
      OPEN partitions
      FETCH NEXT FROM partitions INTO @@instancePartition, @@relationshipPartition
      WHILE @@fetch_status = 0
      BEGIN
        -- Quite la partición de instancias
    EXEC sp_tables @table_name = @@instancePartition, @table_owner='dbo', @table_type = "'TABLE'"
    IF @@ROWCOUNT > 0
        EXEC('DROP TABLE dbo.[' + @@instancePartition + ']')

        -- Quite la partición de relaciones
    EXEC sp_tables @table_name = @@relationshipPartition, @table_owner='dbo', @table_type = "'TABLE'"
    IF @@ROWCOUNT > 0
        EXEC('DROP TABLE dbo.[' + @@relationshipPartition + ']')
    

        FETCH NEXT FROM partitions INTO @@instancePartition, @@relationshipPartition
      END
      CLOSE partitions
      DEALLOCATE partitions
      GO

English
English (United States)
Deutsch (Deutschland)
German (Germany)
Español (España)
Spanish (Spain)
Français (France)
French (France)
日本語
Japanese
한국어
Korean