You need to get a train to Matsumoto and transfer to the Oita line for a train heading to Hakuba (you might have to change at Shin Omachi station). It will probably take you about 5 hours to get to Matsumoto either Nagoya or Osaka airport.
This is the cheapest and quickest method. You first need to get a bus to Matsumoto, then from there catch a train to Hakuba.Click on this Nagoya to Matsumoto Alpico Bus link for the price and schedule from Nagoya (the Meitetsu bus centre is just outside the Nagoya train station).
