NaHCO3 is inorganic. The traditional definition of an organic compound is a chemical compound that contains at least 1 carbon atom. The definition used by most chemists restricts organic compounds to those compounds that contain a carbon-hydrogen bond. NaHCO3 does not contain such a bond. Also historically, there are some carbon compounds that are not considered to be organic. Among those compounds are carbides, carbonates, and simple oxides such as carbon monoxide and carbon dioxide. And the more common name for NaHCO3 is Sodium bicarbonate. You may notice from the name that we're dealing with a carbonate and as such, such a compound historically hasn't been considered to be an organic compound.
C6H12O6, or sugar, is organic. It is created out of one glucose unit and one fructose unit. It is a carbohydrate, which includes starch, sugar, glucose, and fructose, which means it is a natural product. Last but not least, since it contains carbon, hydrogen, and oxygen, it is organic