• Normally, when a person posts a different solution than was originally given, I would think that an explanation of that solution would automatically be posted as well. So, I had to do my own bit of searching to get the meaning of all the code in this solution. You see, not everybody here is good with all types of coding here. Anyway for those who would like an explanation of the sqlcmd script simply open command prompt or powershell and type sqlcmd /? and all the codes and explanations will be given. For your convenience I attached a screenprint of this function.

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)