Click here to Skip to main content
15,886,519 members
Home / Discussions / Database
   

Database

 
AnswerRe: Save a Query as a View issue Pin
Richard Deeming21-Feb-17 12:04
mveRichard Deeming21-Feb-17 12:04 
QuestionTime Variance Query works - Sorry it needs a tweak Pin
john_berman21-Feb-17 9:48
john_berman21-Feb-17 9:48 
QuestionMySql Resource Pin
BobbyStrain20-Feb-17 14:12
BobbyStrain20-Feb-17 14:12 
AnswerRe: MySql Resource Pin
Peter Leow20-Feb-17 16:08
professionalPeter Leow20-Feb-17 16:08 
QuestionTricky Query that includes a time difference Pin
john_berman20-Feb-17 6:09
john_berman20-Feb-17 6:09 
AnswerRe: Tricky Query that includes a time difference Pin
Richard MacCutchan20-Feb-17 6:22
mveRichard MacCutchan20-Feb-17 6:22 
GeneralRe: Tricky Query that includes a time difference Pin
john_berman20-Feb-17 6:45
john_berman20-Feb-17 6:45 
GeneralRe: Tricky Query that includes a time difference Pin
Richard Deeming20-Feb-17 6:52
mveRichard Deeming20-Feb-17 6:52 
Looks like you're missing:
SQL
AND a.event_id != b.event_id
from your WHERE clause.

(You might want to change that to an ON clause for the JOIN.)

If you want to exclude matches from the same user, you'll also need:
SQL
AND a.user_ID != b.user_ID

Or, to exclude matches for different users:
SQL
AND a.user_ID = b.user_ID




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Tricky Query that includes a time difference Pin
john_berman20-Feb-17 7:04
john_berman20-Feb-17 7:04 
GeneralRe: Tricky Query that includes a time difference Pin
john_berman20-Feb-17 7:06
john_berman20-Feb-17 7:06 
QuestionDatabase Design - Help Appreciated Pin
john_berman19-Feb-17 21:03
john_berman19-Feb-17 21:03 
AnswerRe: Database Design - Help Appreciated Pin
Mycroft Holmes19-Feb-17 21:38
professionalMycroft Holmes19-Feb-17 21:38 
GeneralRe: Database Design - Help Appreciated Pin
john_berman20-Feb-17 6:07
john_berman20-Feb-17 6:07 
QuestionDB Case Sensitivity, unexpected/surprising behaviour Pin
User 1106097918-Feb-17 1:17
User 1106097918-Feb-17 1:17 
AnswerRe: DB Case Sensitivity, unexpected/surprising behaviour Pin
Richard Deeming18-Feb-17 1:35
mveRichard Deeming18-Feb-17 1:35 
PraiseRe: DB Case Sensitivity, unexpected/surprising behaviour Pin
User 1106097918-Feb-17 1:40
User 1106097918-Feb-17 1:40 
GeneralRe: DB Case Sensitivity, unexpected/surprising behaviour Pin
User 1106097918-Feb-17 3:49
User 1106097918-Feb-17 3:49 
GeneralRe: DB Case Sensitivity, unexpected/surprising behaviour Pin
Richard Deeming18-Feb-17 8:30
mveRichard Deeming18-Feb-17 8:30 
GeneralRe: DB Case Sensitivity, unexpected/surprising behaviour Pin
User 1106097918-Feb-17 8:35
User 1106097918-Feb-17 8:35 
QuestionBest Praxis for “user-id/primary” Pin
User 1106097917-Feb-17 9:19
User 1106097917-Feb-17 9:19 
AnswerRe: Best Praxis for “user-id/primary” Pin
Gerry Schmitz17-Feb-17 10:28
mveGerry Schmitz17-Feb-17 10:28 
PraiseRe: Best Praxis for “user-id/primary” Pin
User 1106097917-Feb-17 10:30
User 1106097917-Feb-17 10:30 
GeneralRe: Best Praxis for “user-id/primary” Pin
Gerry Schmitz17-Feb-17 11:00
mveGerry Schmitz17-Feb-17 11:00 
AnswerRe: Best Praxis for “user-id/primary” Pin
Eddy Vluggen17-Feb-17 12:45
professionalEddy Vluggen17-Feb-17 12:45 
PraiseRe: Best Praxis for “user-id/primary” Pin
User 1106097918-Feb-17 0:27
User 1106097918-Feb-17 0:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.