SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    SitePoint Zealot
    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?

  2. #2
    SitePoint Wizard big_al's Avatar
    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

  3. #3
    SitePoint Zealot
    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?

  4. #4
    SitePoint Wizard big_al's Avatar
    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

  5. #5
    SitePoint Zealot
    Join Date
    Oct 2000
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Really? And they both work the same when doing Queries?

  6. #6
    SitePoint Wizard big_al's Avatar
    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

  7. #7
    SitePoint Enthusiast
    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.

  8. #8
    SitePoint Enthusiast
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •