SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
Thread: when to do a JOIN?
-
Dec 5, 2001, 11:27 #1
- Join Date
- Oct 2000
- Posts
- 146
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
when to do a JOIN?
Hi,
In Access you can do joins in the database, and in SQL you can do joins in the code. When is a good time to do the join? Both?
-
Dec 5, 2001, 19:18 #2
- Join Date
- May 2000
- Location
- Victoria, Australia
- Posts
- 1,661
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
When you are JOINING more than one table to eachother by refence to a value in one of the table.
i.e. if you have a Unique indetifier from one table that you use to identify a record in another table
Hope that helps.NET Code Monkey
-
Dec 5, 2001, 21:06 #3
- Join Date
- Oct 2000
- Posts
- 146
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorry,
I worded my question really poorly...
In ASP when you join tables is it done in SQL or Access?
-
Dec 5, 2001, 21:13 #4
- Join Date
- May 2000
- Location
- Victoria, Australia
- Posts
- 1,661
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You can use JOIN on either of them
.NET Code Monkey
-
Dec 5, 2001, 21:29 #5
- Join Date
- Oct 2000
- Posts
- 146
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Really? And they both work the same when doing Queries?
-
Dec 5, 2001, 21:36 #6
- Join Date
- May 2000
- Location
- Victoria, Australia
- Posts
- 1,661
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Depending on the query.
Not all query's will work from SQL to Access and vice versa.
it all depends on the complexity of the query.
With Access you can actualy be lazy and create a query in the gui Access gives you and then query that query as if where a table from your Script.NET Code Monkey
-
Dec 6, 2001, 11:09 #7
- Join Date
- Oct 2001
- Location
- location location
- Posts
- 89
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Or you could be lazy by creating the query in Access and when you are finished, grab the SQL by clicking the view button (probably left most button in Access) and choose SQL View and copy the SQL out of there and paste into ASP.
-
Dec 6, 2001, 17:14 #8
- Join Date
- Aug 2001
- Posts
- 39
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Access and SQL can do joins, but access sql and MS SQL Server sql isn't compatible in most cases. MS SQL supports a more advanced set of functions and joins, but dont copy access code to sql.
Use the Query Analyser to build MS SQL queries, it's harder to learn, but there are great help files accesible from the menu.SiteTell.com: Get the best viral marketing tool on the planet and watch as the number of unique visitors to your site soars!
Bookmarks