Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Inner Join vs Cartesian Product?

 
   Database Help (Home) -> Visual Basic RSS
Next:  Compiler error: Invalid outside procedure  
Author Message
U-CDK_CHARLESCharl

External


Since: May 24, 2004
Posts: 3



(Msg. 1) Posted: Thu Jun 03, 2004 4:07 pm
Post subject: Inner Join vs Cartesian Product?
Archived from groups: microsoft>public>vb>database (more info?)

List:

I've a query works correctly on my test dataset written one of two ways:

' All the AccountAccess records that have a matching user over here
SELECT AccountAccess.* FROM AccountAccess, [User List] WHERE
AccountAccess.User = [User List].[User Key]

SELECT AccountAccess.* FROM AccountAccess INNER JOIN [User List] ON
AccountAccess.User = [User List].[User Key]

Which is preferable? Why?

Thanx


Charles

 >> Stay informed about: Inner Join vs Cartesian Product? 
Back to top
Login to vote
Bob Butler

External


Since: Jul 07, 2003
Posts: 64



(Msg. 2) Posted: Thu Jun 03, 2004 4:15 pm
Post subject: Re: Inner Join vs Cartesian Product? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"U-CDK_CHARLES\Charles" wrote in
message
 > List:
 >
 > I've a query works correctly on my test dataset written one of two
 > ways:
 >
 > ' All the AccountAccess records that have a matching user over here
 > SELECT AccountAccess.* FROM AccountAccess, [User List] WHERE
 > AccountAccess.User = [User List].[User Key]
 >
 > SELECT AccountAccess.* FROM AccountAccess INNER JOIN [User List] ON
 > AccountAccess.User = [User List].[User Key]
 >
 > Which is preferable? Why?

IMO the second separates the join specifications from the where conditions
and is much easier to work with.

--
Reply to the group so all can participate
VB.Net... just say "No"

 >> Stay informed about: Inner Join vs Cartesian Product? 
Back to top
Login to vote
Utf-8BS2plbGw

External


Since: Jan 30, 2004
Posts: 29



(Msg. 3) Posted: Sun Jun 06, 2004 2:51 pm
Post subject: RE: Inner Join vs Cartesian Product? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I would go for the one using INNERJOIN because:

- It's updateable (edit and adding).
- I can very easily modify it to include a WHERE clause if needed later on.

I'm not sure about it's speed, but I think it's quicker.

PS. I always work with INNERJOIN (or Left - Right join) because I find it easier to read the SQL string.

Kjell
 >> Stay informed about: Inner Join vs Cartesian Product? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table "PriceList" and there a column "Pricemk" wich is data type "money". All data in this column is in form "10001,35". So why when...

arrays - is there a way to concatenate the contents of an array (looping through the array) and storing each item in a comma delimited string? Thanks!

DataReport PageBreak - Hi everyone, I would like to know how to force pagebreak in a datareport for example after 5 records printed. Thank you all

Possible Use of a Cursor - I have a complex query that I hope I can explain it well enough for everyone to understand. I have a table that contains information for work instructions. Contained in the table are "MACHINE_PROC" these are groupings of machining processes....

Scroll Bars - Is there a way to find the size of scrollbars on a system using Visual Basic 6.0? I know how to look and change them on the display properties, but I don't know how to access that information from within Visual Basic.
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]