I'd like to prove the nonexistence of a real analytic function, injective, nonsurjective that sends rationals to rationals. Is it a classical result ? If not, any hints on how to prove it ? Thanks in advance for you help.

The statement in the question is not true. Given any two enumerable and dense sets in open intervals of the reals, there is a (complex) analytic^{1} function giving a bijection between them. See the following paper: Analytic Transformations of Everywhere Dense Point Sets, Philip Franklin, Transactions of the American Mathematical Society, Vol. 27, No. 1 (Jan., 1925), pp. 91100. The analytic functions can be constructed along similar lines to the method outlined in this MO answer. Is a real power series that maps rationals to rationals defined by a rational function? Also see this mathforum.org discussion on the subject with plenty of links. A question on realanalytic functions ^{1} The analytic function can be chosen to be entire on the complex plane except for the obvious case where either of the ends of the real interval in the domain is bounded but the corresponding end in the range is unbounded, where the function must have a singularity. 

