How to distinguish between Na2CO3 and NaHCO3 by a chemical test?
Heating salt is an important test in determining the anion in the salt by checking the gas evolved. This test is called dry heating test and is a important part of qualitative analysis of salt. But this test goes under physical examination of salt (checking color, appearence etc.).

One important chemical test to differentiate carbonate and bicarbonate is $\ce{MgSO4}$  test. 

$$\ce{Na2CO3 + Mg^2+ -&gt; MgCO3↓(white) + Na+}$$

$$\ce{NaHCO3 + Mg^2+ -&gt; MgCO3↓(white) + H2O + CO2 ^}$$

When carbonate salt is reacted with $\ce{MgSO4}$, a white salt precipited while bicarbonate salt on reacting with $\ce{MgSO4}$, not only a white salt precipited but also a brisk effervescence occur. The gas  is detected  by passing it through lime water.