Ok your problem is caused by either A) a bad connection at one of the ends. Either behind the spedo cluster, or at the tranny, where the speed sensor that tells your car how fast you are going is.
B) Your speed sensor has gone bad. Refer to this page for instructions on how to find and remove the sensor. http://www.nissanforums.com/showthread.php?p=775482#post775482