A couple of good starting points ...
As others have pointed out, we don't know what the log says, so we are only guessing ...
This into: phrase looks incorrect:
into :Basin1-, :BasinName-
It should likely be:
into :Basin1-, :BasinName1-
And later when using the macro variables, are the basins actually numbers, or are they character strings? For numbers, your code is correct:
where Basin=&&Basin&i;
But for character strings you would need to add doublequotes:
where Basin="&&Basin&i";
... View more