John,
Assuming you have declared @value_needed, create another query after
your first as follows
SELECT
@value_needed =a.adviceID
FROM Advice a INNER JOIN userData UD on A.userIDFK = UD.UserID WHERE
a.userIDFK = @Input_userID
Now, the value of @value_needed can be used in the where clause of the
query in question.
SELECT
aa.Advice_aboutID, aa.AdviceIDFK, aa.PhotoDescription,
aa.adviceSensitivity, aa.adviceCareer, aa.adviceHumor,
aa.advicePersonality,
aa.adviceIntelligence, aa.PhotoPath, aa.Photo FROM Advice_about aa
WHERE aa.adviceIDFK = @value_needed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226639
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54