Srimad Bhagvata Mahapurana: Book 11: Chapter 20: Verses 1-11
Uddhava submitted : The command of the almighty Lord, viz., Yourself, (which goes by the name of Veda) consists of (both) injunctions and interdictions, and (thus) takes into account the good and evil nature of actions (as determined by their good and evil consequences), 0 lotus-eyed One ! The Veda further cognizes the distinction of the Varnas and Asramas (based on their virtues and faults); the merits and demerits of those born in the irregular course (of the union of a man of a lower order with a woman of a higher grade) and those regularly born (of the union of a man of a higher order with a woman of lower grade); the substance, place, age and time (suitable or otherwise for a sacrifice) as well as (the existence of) heaven and hell (attained as a result of virtuous and sinful actions). How can Your word (in the form of the Vedas), consisting as it does of injunctions and interdictions, lead to final beatitude without taking into consideration the distinction of good and bad (actions)? Your word in the form of Veda is the (one) excellent eye possessed by the manes, gods and human beings, enabling them to obtain insight into the unseen purpose (of life, viz., final beatitude, heavenly bliss and so on) as well as into the end (to be attained in this very life) and the means (of attaining it), 0 almighty Lord ! Knowledge of the distinction between good and evil is derived from Your command (the Veda), and not by itself. And it is by Your word (alone) that this distinction is negatived. This obviously causes bewilderment (in my mind). (Be pleased to set it at rest).
The glorious Lord replied : Three Yogas (disciplines or paths) in the shape of (spiritual) enlightenment, (disinterested) action and Devotion have been taught by Me (in the sections of the Veda treating of Brahma, ritual acts and worship of gods respectively) with intent to ensure the highest good of men (in the shape of Liberation). No other way is found anywhere (in.the scriptures). Out of these the path of Jnana is efficacious for those who have lost (all) charm for (the fruit of) ritual acts (considering it to be full of sorrow) and (accordingly) abandoned such acts: whereas the path of Action is effectual for those who hanker after their fruit and whose mind has not (therefore) recoiled from such acts (as full of sorrow). To the man, however, in whom has sprouted by (some) stroke of (good) fortune a zeal for (hearing) My stories (and chanting My name) etc., and who is neither disgusted with the pleasures of sense nor deeply attached to them, the path of Devotion brings success (in the form of God-Realization). A man should (continue to) do his duties (enjoined upon him by the Sastras-whether of an obligatory nature or those of an occasional type) so long as he does not get disgusted with the pleasures of sense or so long as keenness does not appear in him for listening to My stories etc. A man adhering to his course of conduct and propitiating Me through sacrificial performances, but never hankering for their fruit, O Uddhava, neither ascends to heaven nor goes down to perdition unless he perpetrates a prohibited act. (Nay,) continuing in this body and sticking to his own righteous course,
abstaining from sin and (thus) purged of (all) impurities (in the shape of attachment etc.), he
automatically attains pure wisdom (in the form of Self-Realization) or (even) devotion to Me(which is superior to Self-Realization) by My grace.