Similarly, N.D.C.C. ?? 28-27-02(2) provides for an appeal from [a] final order affecting a substantial right made in special proceedings. . . .[??22] Treating the declaratory judgment action as a special proceeding from which an appeal can be taken, the court must analyze whether there is a final order affecting a substantial right.