select statement to static char