//return convertTableToView(database, getTable(database, viewname));
}
public static View getViewFromAlias(Database database, String viewname){
int maxView = database.getViews().length;
View view = null;
for (int i = 0; i < maxView; i++) {
view = database.getViews()[i];
viewname = StringUtils.upperCase(viewname);
String viewAlias = StringUtils.upperCase(view.getAlias());
if (viewAlias.equals(viewname))
return view;
}
return null;
//return convertTableToView(database, getTable(database, viewname));