如何在MDB文件上运行SQL查询?

时间:2023-01-13 18:01:42

I need to run an UPDATE query on a large MDB file (~30mb), is it possible? how?

我需要在一个大型MDB文件(~30mb)上运行一个更新查询,可能吗?如何?

1 个解决方案

#1


5  

As Remou said, use the Query Designer.

正如Remou所说,使用查询设计器。

Once you are in there you can drag and drop as you like to.

一旦你到了那里,你就可以随心所欲地拖拽。

If you really want to type in the SQL directly, you can. You can switch from Design view to SQL view and manually type it in.

如果您确实希望直接输入SQL,那么可以这样做。您可以从设计视图切换到SQL视图,并手动输入它。

The SQL is pretty standard on MS Access. There are some things on other DBs that you would think are part of the standard, but aren't and having been implemented on MS Access' side. On MS Access the wild card character might be different than you expect. The default is "*" (ANSI-89) for .mdb's and .accdb's, but that could also be "%" is your are working with ANSI-92 SQL (used by .adp's - Access Data Projects). As a rule, you use the ANSI-89 wildcards when you run queries and find-and-replace operations against Access databases — .mdb and .accdb files. You use the ANSI-92 wildcards when you run queries against Access projects — Access files connected to Microsoft SQL Server databases.

SQL是MS访问的标准。在其他DBs上有一些东西,您认为是标准的一部分,但是并没有在MS Access的方面实现。在MS Access中,通配符可能与您预期的不同。mdb和.accdb的默认值是“*”(ANSI-89),但也可以是“%”,因为您正在使用ANSI-92 SQL(被.adp的- Access Data Projects使用)。通常,在运行查询和查找和替换对Access数据库(.mdb和.accdb文件)的操作时,使用ANSI-89通配符。当您对Access项目运行查询时,您使用ANSI-92通配符—访问连接到Microsoft SQL Server数据库的文件。

You might also be used to nesting queries in MySQL. Some of them you can't do the same way in MS Access - you have do some funny workarounds to get the same effect. Other wise it's pretty close. This may also have something to do with the differences between ANSI-89 SQL and ANSI-92 SQL (and beyond).

您还可以在MySQL中使用嵌套查询。他们中的一些人在MS Access中不能做同样的事情——你做了一些有趣的工作,得到了同样的效果。另一种解释是很接近。这也可能与ANSI-89 SQL和ANSI-92 SQL(以及其他)之间的差异有关。

#1


5  

As Remou said, use the Query Designer.

正如Remou所说,使用查询设计器。

Once you are in there you can drag and drop as you like to.

一旦你到了那里,你就可以随心所欲地拖拽。

If you really want to type in the SQL directly, you can. You can switch from Design view to SQL view and manually type it in.

如果您确实希望直接输入SQL,那么可以这样做。您可以从设计视图切换到SQL视图,并手动输入它。

The SQL is pretty standard on MS Access. There are some things on other DBs that you would think are part of the standard, but aren't and having been implemented on MS Access' side. On MS Access the wild card character might be different than you expect. The default is "*" (ANSI-89) for .mdb's and .accdb's, but that could also be "%" is your are working with ANSI-92 SQL (used by .adp's - Access Data Projects). As a rule, you use the ANSI-89 wildcards when you run queries and find-and-replace operations against Access databases — .mdb and .accdb files. You use the ANSI-92 wildcards when you run queries against Access projects — Access files connected to Microsoft SQL Server databases.

SQL是MS访问的标准。在其他DBs上有一些东西,您认为是标准的一部分,但是并没有在MS Access的方面实现。在MS Access中,通配符可能与您预期的不同。mdb和.accdb的默认值是“*”(ANSI-89),但也可以是“%”,因为您正在使用ANSI-92 SQL(被.adp的- Access Data Projects使用)。通常,在运行查询和查找和替换对Access数据库(.mdb和.accdb文件)的操作时,使用ANSI-89通配符。当您对Access项目运行查询时,您使用ANSI-92通配符—访问连接到Microsoft SQL Server数据库的文件。

You might also be used to nesting queries in MySQL. Some of them you can't do the same way in MS Access - you have do some funny workarounds to get the same effect. Other wise it's pretty close. This may also have something to do with the differences between ANSI-89 SQL and ANSI-92 SQL (and beyond).

您还可以在MySQL中使用嵌套查询。他们中的一些人在MS Access中不能做同样的事情——你做了一些有趣的工作,得到了同样的效果。另一种解释是很接近。这也可能与ANSI-89 SQL和ANSI-92 SQL(以及其他)之间的差异有关。