var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Limit SQl Statement To Return Unique Records Only
Limit SQl Statement To Return Unique Records Only
I’m transforming a stand alone mail script to run of our main user database and I have the unique problem of my SQL Statement sending everyone as many emails as there are users.
The SQL is inside a loop like this to cycle trough all the user and send out emails to each.
Do While Not RS.eof
SQL = "SELECT * FROM Users WHERE subNewsletter=True AND Newsletter_Name='Test'"
Is there a way to force the SQL Statement to return unique hits only maybe using each users ID #?
Re: Limit SQl Statement To Return Unique Records Only
This is just a thought...I'm not an expert. Check out the use of DISTINCT in SQL statements. An example would be:
SELECT DISTINCT Field1, Field2, Field3 FROM YourTableName
You can add WHERE criteria to this if you need to.
Hope this helps.