Column 'regdate' in where clause is ambiguous