Click here to Skip to main content
15,920,896 members
Home / Discussions / Database
   

Database

 
GeneralRe: Install my SQL Database to other Machine Pin
Verdant12323-Feb-04 12:10
Verdant12323-Feb-04 12:10 
GeneralSaving DataSet into Access MDB Pin
dave charlton22-Feb-04 18:15
dave charlton22-Feb-04 18:15 
GeneralProblems building Query Pin
xfitr221-Feb-04 18:16
xfitr221-Feb-04 18:16 
GeneralRe: Problems building Query Pin
John Kuhn21-Feb-04 18:59
John Kuhn21-Feb-04 18:59 
GeneralRe: Problems building Query Pin
xfitr221-Feb-04 20:57
xfitr221-Feb-04 20:57 
GeneralRe: Problems building Query Pin
John Kuhn22-Feb-04 6:05
John Kuhn22-Feb-04 6:05 
GeneralRe: Problems building Query Pin
xfitr222-Feb-04 6:57
xfitr222-Feb-04 6:57 
GeneralRe: Problems building Query Pin
John Kuhn22-Feb-04 7:54
John Kuhn22-Feb-04 7:54 
Yeah, I suppose joins are best applied when you want to include fields from table on both sides of the join statement, but they can be applied to form the basis for including or excluding rows. Since it was late last night, the idea of INNER JOINS might be flawed... I always seem to try several things until I get the one thing that works consistenly.

* thinking out loud *

SELECT table1.*, table2.* FROM table1 RIGHT JOIN table2 ON table1.key = table2.fkey WHERE ...

-- all rows from table2 and matching rows from table1

SELECT table1.*, table2.* FROM table1 LEFT JOIN table2 ON table1.key = table2.fkey WHERE ...

-- all rows from table1 and matching rows from table2

SELECT table1.*, table2.* FROM table1 INNER JOIN table2 ON table1.key = table2.fkey WHERE ...

-- only matching rows from table1 and table2

SELECT table1.*, table2.* FROM table1 FULL JOIN table2 ON table1.key = table2.fkey WHERE ...

-- all rows from table1 and table2


Ok, so that's the difference, using IN or EXISTS simply forms the basis for inclusion or exclusion of rows from the table specified in the FROM clause, whereas using a join does as described above.

So, it seems like your example should work consistently, unless the underlying data are changing so often that the results change accordingly. If you like, you can send me some or all of the data and I can try it out.



What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
GeneralRe: Problems building Query Pin
xfitr222-Feb-04 8:25
xfitr222-Feb-04 8:25 
GeneralTriggers in windows application ^_^!!! Pin
solostar***19-Feb-04 20:15
solostar***19-Feb-04 20:15 
GeneralRe: Triggers in windows application ^_^!!! Pin
Mazdak20-Feb-04 1:11
Mazdak20-Feb-04 1:11 
GeneralSQL / PHP Problem Pin
LOSTTWARE.com19-Feb-04 18:18
LOSTTWARE.com19-Feb-04 18:18 
GeneralMSDE Connection String Pin
monrobot1319-Feb-04 15:40
monrobot1319-Feb-04 15:40 
GeneralRe: MSDE Connection String Pin
Mike Dimmick20-Feb-04 0:15
Mike Dimmick20-Feb-04 0:15 
GeneralProblem in Joining Two Tables Pin
Touseef Afzal19-Feb-04 10:23
Touseef Afzal19-Feb-04 10:23 
GeneralRe: Problem in Joining Two Tables Pin
Edbert P19-Feb-04 12:43
Edbert P19-Feb-04 12:43 
GeneralRe: Problem in Joining Two Tables Pin
Touseef Afzal20-Feb-04 10:31
Touseef Afzal20-Feb-04 10:31 
GeneralRe: Problem in Joining Two Tables Pin
Edbert P22-Feb-04 17:41
Edbert P22-Feb-04 17:41 
GeneralTimeouts in C# Pin
19-Feb-04 5:49
suss19-Feb-04 5:49 
GeneralRe: Timeouts in C# Pin
Tom Larsen19-Feb-04 10:44
Tom Larsen19-Feb-04 10:44 
GeneralRe: Timeouts in C# Pin
Kwai Cheng Kane19-Feb-04 12:45
Kwai Cheng Kane19-Feb-04 12:45 
Questionneed sql query? Pin
murali_utr18-Feb-04 18:36
murali_utr18-Feb-04 18:36 
AnswerRe: need sql query? Pin
stefan b18-Feb-04 18:54
stefan b18-Feb-04 18:54 
GeneralRe: need sql query? Pin
murali_utr18-Feb-04 19:01
murali_utr18-Feb-04 19:01 
GeneralSimple Dataset Question... Pin
Verdant12318-Feb-04 16:45
Verdant12318-Feb-04 16:45 

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.