[jug-discussion] OT - sql question
Hi all, My SQL skills are apparently a bit rusty (been a while since I've had to do any hard SQL ;-) and I would appreciate any help with this. I am working on my polling system and would like to send an e-mail to all members who have not voted. Member pk_member_id email PollVote member_id poll_id I have tried to select all members who are not in the PollVote table, but that still returns all of the members. Here's a sample: select email from Member, PollVote where Member.pk_member_id != PollVote.member_id This doesn't work, neither does a left join, I know there must be some kind of exclusion join or something like that, but I can't figure it out. I have also tried distinctrow and distinct but this doesn't give me what I want. I am using MySQL if that makes any difference. Thanks in advance JUGHeads! -warner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jug-discussion] OT - sql question
Oops, goofed up my example sql a little, changes below: On Thursday, October 31, 2002, at 08:07 AM, Warner Onstine wrote: Hi all, My SQL skills are apparently a bit rusty (been a while since I've had to do any hard SQL ;-) and I would appreciate any help with this. I am working on my polling system and would like to send an e-mail to all members who have not voted. Member pk_member_id email PollVote member_id poll_id I have tried to select all members who are not in the PollVote table, but that still returns all of the members. Here's a sample: select email from Member, PollVote where Member.pk_member_id != PollVote.member_id Should be select email from Member, PollVote where Member.pk_member_id != PollVote.member_id and PollVote.poll_id = 4 This doesn't work, neither does a left join, I know there must be some kind of exclusion join or something like that, but I can't figure it out. I have also tried distinctrow and distinct but this doesn't give me what I want. I am using MySQL if that makes any difference. Thanks in advance JUGHeads! -warner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jug-discussion] OT - sql question
Yeah! Thanks all for your help, I found another script that allowed it to work using first one select, then looping through the values and putting those in another select. -warner On Thursday, October 31, 2002, at 08:59 AM, Vincent Greene wrote: I think it may depend on the version of MySql, but in the version I am using, sub-selects are not supported. You can get the same results with a left join like: select email from Member left join PollVote on Member.pk_member_id = PollVote.member_id where PollVote.member is null I suspect once you have more than one poll active, you are better off with: select email from Member left join PollVote on Member.pk_member_id = PollVote.member_id where PollVote.poll_id = :SelectedPoll Warner Onstine wrote: Hi all, My SQL skills are apparently a bit rusty (been a while since I've had to do any hard SQL ;-) and I would appreciate any help with this. I am working on my polling system and would like to send an e-mail to all members who have not voted. Member pk_member_id email PollVote member_id poll_id I have tried to select all members who are not in the PollVote table, but that still returns all of the members. Here's a sample: select email from Member, PollVote where Member.pk_member_id != PollVote.member_id This doesn't work, neither does a left join, I know there must be some kind of exclusion join or something like that, but I can't figure it out. I have also tried distinctrow and distinct but this doesn't give me what I want. I am using MySQL if that makes any difference. Thanks in advance JUGHeads! -warner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [jug-discussion] J2EE vs. .Net: Lies, Damn Lies and Benchmarks
Actually, my own testing shows that for many, many things they are right about equal on the same machine (.net usually having a slight prerformance advantage). Any decision should probably come down to other issues. -Original Message- From: Rick Hightower [mailto:rhightower;learningpatterns.com] Sent: Thursday, October 31, 2002 12:54 AM To: [EMAIL PROTECTED] Subject: [jug-discussion] J2EE vs. .Net: Lies, Damn Lies and Benchmarks Rikard Oberg states: Well, how does one conclude a review like this? What is clear is that not only has the benchmark been conducted with seriously flawed code, but TMC has also on a number of points lied about the contents of said code and how it is supposed to perform. This is of course bad, for a multitude of players. One group of people who may want to consider it for more than five minutes however are those who are currently TMC customers. If lies such as what is contained in this report is possible, how could you possibly trust them to train your developers and architects? If reality can be so seriously twisted in a TMC certified report, what will the quality of their training then be like? You may want to think twice about your options in this regard. Several independent sources have now confirmed that The Middleware Company was indeed paid by Microsoft to conduct this report. http://dreambean.com/petstore.html TMC used BMP. They did not cahce things like the MS version did. The benchmark is flawed. Really, really flawed. They used an older version of BMP yet used the latest beta version of .Net. Read the report by Rikard. Even so... the results are close. It's no surprise to us or our engineers that Windows on Intel is faster: it's their home ground. The first Pet Store comparison, that was widely repudiated, showed a 10x advantage. This one shows a 2x and they've got home field advantage. http://www.theregister.co.uk/content/4/27833.html If someone paid us to do the same test with Resin EE or JBoss, we could blow the .Net solution out of the water for a fraction of the cost. Rick Hightower Chief Technology Officer Learning Patterns Corp. http://learningpatterns.com Phone: 520.290.6855 Fax: 520.290.4179 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]