clean up get_type_sql
clean up get_type_sql
fix checkin error
fix checkin error
seperate querying from table creation