Access Query in SQL Server Question

Results 1 to 2 of 2

Thread: Access Query in SQL Server Question

  1. #1
    Join Date
    Dec 1969

    Default Access Query in SQL Server Question

    Hi,<BR>I created a series of queries to update some table fields in Access but they do not run in SQL Server. Syntax Errors occur. I don&#039;t understand why SQL queries do not run across the two Microsoft databases. Here is one of them from Access<BR><BR>UPDATE (dbo_PROJECT INNER JOIN dbo_DRILL_HOLE ON <BR> dbo_PROJECT.PROJECT_NUMBER = dbo_DRILL_HOLE.PROJECT_NUMBER) <BR>INNER JOIN dbo_DRILL_HOLE_COORDINATE ON dbo_DRILL_HOLE.HOLE_NUMBER = dbo_DRILL_HOLE_COORDINATE.HOLE_NUMBER <BR>SET dbo_DRILL_HOLE_COORDINATE.GRID_TYPE_CODE = "UTM-12"<BR>WHERE (((dbo_PROJECT.PROJECT_NUMBER)="HLU") AND ((dbo_DRILL_HOLE_COORDINATE.COORD_TYPE_CODE)="P")) ;<BR><BR>This runs fine in Access but SQL Server does not seem to like the brackets. When I try to use Inner Join in SQL Server it does not like the word Join. Can anyone explain the differences or point to somewhere where these are explained. It would be nice to be able to translate my statements between the two.<BR>Thanks for any help you can provide me.

  2. #2
    Join Date
    Dec 1969

    Default What brackets?

    Anyway, in SQL Server, "..." is the same as [...] in Access, by default. You do NOT use "..." for string constants. You use &#039;...&#039;. (You can change the meaning of "..." but don&#039;t do it unless you know why.)<BR><BR>So just &#039;UTM-12&#039; instead of "UTM-12", etc.<BR><BR>Having said all this: I&#039;m not sure that you can do an UPDATE on JOINs in this fashion.

Posting Permissions

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