I have an SQL statement that selects all the distinct entries from a list that have a certain 'iParent' number, but I need to add in one parameter, and not sure how to go about it. Here is what I have so far... sqle = "SELECT DISTINCT ThreadParent, authoremail FROM la_FORUM_messages where ThreadParent=" & iParent & "" Code (markup): I need to add in something that says: BUT NOT including session("emailaddress") (entire query should read: select all unique email addresses from records with a specific parent id, EXCEPT for email address XXXXXXXXXXX
Try sql = "SELECT DISTINCT ThreadParent, authoremail FROM la_FORUM_messages where ThreadParent=" & iParent & " and EmailAddress <> '" & session("emailaddress") & "'" Code (markup):