Re: ANSI 97 SQL (MS ACCESS)




"Rick" <Rick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1711CCDA-8562-4E2E-A5C0-B6CBEA86A676@xxxxxxxxxxxxxxxx
> I'm working on a VB 6.0 application that uses DAO 3.51 to connect to an MS
> Access 97 database (I know it's quite old, please save your comments)
>
> My problem is in Access's SQL syntax. The program is suppossed to
> automatically bluid the queries (they are all SELECT statements). I find
> that
> the INNER JOIN statements are quite different from SQL2000.

SQL joins are SQL joins. There are minor variations in syntax from one
platform to another. Here's the thing: you shouldn't be passing SQL from
your VB app anyway. Imagine a future developer trying to migrate your code
to SQL Server. They would have to track down a bunch of string constants in
your VB code before they can even think about the task at hand. Once you
figure out your JOIN's, put them in queries. Then switch to ADO. You can
use the same syntax to call queries in Access or SP's in SQL Server (and you
won't have to worry about DAO's object layer messing with your SQL syntax.)

>
> Is there any information on Internet that teaches me how to build queries
> from access97? The problem is with the INNER JOINs, since I have to relate
> several tables at once.

Okay, so what problem are you having with INNER JOIN's? How about posting
the query and/or code?

>
>
> --
> Rick


.



Relevant Pages

  • Re: 2 crosstabs
    ... I have no problem using one query as the source for a line graph. ... problems comes when I want to combine both queries into one line graph. ... sense of it to generate my own SQL: ... Orders INNER JOIN (Products INNER JOIN [Order ...
    (microsoft.public.access.queries)
  • Re: ANSI 97 SQL (MS ACCESS)
    ... > automatically bluid the queries. ... > the INNER JOIN statements are quite different from SQL2000. ... Access formats its joins in a funky manner (lots of parentheses and ... Simply put, if you're familiar with SQL, write the ...
    (microsoft.public.vb.general.discussion)
  • Re: Relational question
    ... the two queries are equivalent but with further explanation ... requiring its use in an equivalent SQL query. ... >Note that if this were an INNER JOIN we would only need to ... >>otherwise the two original joins do not even have the same sets of ...
    (microsoft.public.sqlserver.programming)
  • Re: DB structure question
    ... would run without flaw in SQL Server. ... > and use the Access Query Builder to create my query using the GUI Design ... > FROM (Reviews As A INNER JOIN Book_users As B ... > All queries should be designed, created and tested using the Access Query ...
    (microsoft.public.inetserver.asp.db)
  • Re: mySQL query with variables, null return
    ... The SQL is valid, and when I run it in the ... > why isn't the first query returning anything, ... You SQL syntax is broken. ... You can't run 2 queries at once using mysql_query. ...
    (comp.lang.php)