We shall prove that the Hamburger (Stieltijes) moment problems always have a solution in Schwartz space by using a constructive method of smooth solution for a given moments and we will show that there exist infinitely many solutions for the moment problems. Also, we give weight functions for Bochner-Krall orthogonal polynomial.