Fixed most of the compiler warnings about unused variables in test programs
Added check to prevent multicolumns in sub selects