为什么Access会这样做? [英] Why does Access do this?

查看:71
本文介绍了为什么Access会这样做?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Access 97

如果我在数据库窗口的查询选项卡上选择新建,并转到sql

视图并键入以下内容,例如:


INSERT INTO tblMyTable(dtDate,txtAny)

VALUES(#2003-09-03#,'''blah'');

然后保存查询,关闭它,然后通过单击设计

按钮重新打开,以便在sql视图中打开它。 sql已更改为:


INSERT INTO tblMyTable(dtDate,txtAny)

SELECT#2003-09-03#,''blah'';


Access Help和ADH97都确认_before saved_ version是

正确的语法,并且查询执行两种形式的预期,所以

这不是危及生命的情况。然而,闲散的好奇心驱使我去询问主题行中的问题。


任何人都对这个问题有任何想法?

干杯


彼得


Access 97
If I select New on the Query tab of the db window, and go staight to sql
view and type in the following for example:

INSERT INTO tblMyTable ( dtDate, txtAny)
VALUES (#2003-09-03#, ''blah'');

and then save the query, close it, and then reopen by clicking the design
button so it opens in sql view. The sql has changed to:

INSERT INTO tblMyTable ( dtDate, txtAny)
SELECT #2003-09-03#, ''blah'';

Both Access Help and ADH97 confirm that the _before saved_ version is the
correct syntax, and the query does what is expected of it in both forms, so
it isn''t a life threatening situation. However, idle curiosity drives me to
ask the question in the subject line.

Anyone got any thoughts on the subject?

Cheers

Peter


推荐答案

Peter James写道:
Peter James wrote:
Access 97
如果我在数据库窗口的查询选项卡上选择新建,并转到sql
视图并输入以下内容作为示例:

INSERT INTO tblMyTable(dtDate,txtAny)
VALUES(#2003-09-03#,''blah'');

然后保存查询,关闭它,然后通过单击设计
按钮重新打开,以便在sql视图中打开它。 sql已更改为:

INSERT INTO tblMyTable(dtDate,txtAny)
SELECT#2003-09-03#,''blah'';

两者Access帮助和ADH97确认_before saved_版本是正确的语法,并且查询在两种形式中都能达到预期的效果,所以
它不会危及生命。然而,空闲的好奇心驱使我在主题栏中提出问题。
Access 97
If I select New on the Query tab of the db window, and go staight to sql
view and type in the following for example:

INSERT INTO tblMyTable ( dtDate, txtAny)
VALUES (#2003-09-03#, ''blah'');

and then save the query, close it, and then reopen by clicking the design
button so it opens in sql view. The sql has changed to:

INSERT INTO tblMyTable ( dtDate, txtAny)
SELECT #2003-09-03#, ''blah'';

Both Access Help and ADH97 confirm that the _before saved_ version is the
correct syntax, and the query does what is expected of it in both forms, so
it isn''t a life threatening situation. However, idle curiosity drives me to
ask the question in the subject line.




谁知道?我的猜测是,它是访问规范形式的

插入常量值。使用非法形式的

Select语句虽然有点吸引人!!


BTW,在帮助中的某个地方有一个警告,他们会这样做

这个,你不用担心它。


-

Marsh



Who knows? My guess is that it''s Access'' canonical form for
inserting constant values. The use of an illegal form of
the Select statement is kind of intriguing though!?

BTW, somewhere in Help there is a warning that they will do
this and that you should not worry about it.

--
Marsh

< br>

" Peter James" <流**** @ yahoo.co.uk>在留言中写道

news:bj ********** @ codas.jet.uk ...
"Peter James" <ow****@yahoo.co.uk> wrote in message
news:bj**********@codas.jet.uk...
Access 97
如果我选择在数据库窗口的查询选项卡上新建,并转到sql
视图并输入以下内容,例如:

INSERT INTO tblMyTable(dtDate,txtAny)
VALUES( #2003-09-03#,''blah'');

然后保存查询,关闭它,然后通过单击设计
按钮重新打开,以便在sql视图中打开。 sql已更改为:

INSERT INTO tblMyTable(dtDate,txtAny)
SELECT#2003-09-03#,''blah'';

两者Access帮助和ADH97确认_before saved_版本是正确的语法,并且查询执行两种形式的预期,
因此它不会危及生命。然而,空闲的好奇心让我花了b $ b来询问主题中的问题。

任何人都对这个问题有任何想法?

干杯

彼得
Access 97
If I select New on the Query tab of the db window, and go staight to sql
view and type in the following for example:

INSERT INTO tblMyTable ( dtDate, txtAny)
VALUES (#2003-09-03#, ''blah'');

and then save the query, close it, and then reopen by clicking the design
button so it opens in sql view. The sql has changed to:

INSERT INTO tblMyTable ( dtDate, txtAny)
SELECT #2003-09-03#, ''blah'';

Both Access Help and ADH97 confirm that the _before saved_ version is the
correct syntax, and the query does what is expected of it in both forms, so it isn''t a life threatening situation. However, idle curiosity drives me to ask the question in the subject line.

Anyone got any thoughts on the subject?

Cheers

Peter




当你有很长而复杂的查询时,这可能会更令人沮丧

哪个(为了弄清楚)他们以一种清晰易读的方式展示空间,回车等等。不仅所有的格式都会丢失,而且不必要的额外东西通常写在 - 例如用表名称前缀

字段。


这很重要,我将SQL保存到文本文件,在记事本中编辑

并将其粘贴到Access查询中。


Fletcher



It can be even more frustrating when you have very long and complex queries
which (in order to make some sense out of them) you lay out in a legible
fashion with spaces, carriage returns, etc. Not only is all formatting
lost, but unnecessary extra stuff is often written in - such as prefixing
the field with the table name.

Where this is important, I save the SQL to a text file, edit it in Notepad
and paste it into the Access query.

Fletcher


周三,3 2003年9月12:14:46 +0100 in comp.databases.ms-access,Peter

James <流**** @ yahoo.co.uk>写道:
On Wed, 3 Sep 2003 12:14:46 +0100 in comp.databases.ms-access, "Peter
James" <ow****@yahoo.co.uk> wrote:
Access 97
如果我在数据库窗口的查询选项卡上选择新建,并转到sql
视图并输入以下内容作为示例:

INSERT INTO tblMyTable(dtDate,txtAny)
VALUES(#2003-09-03#,''blah'');

然后保存查询,关闭它,然后通过单击设计
按钮重新打开,以便在sql视图中打开它。 sql已更改为:

INSERT INTO tblMyTable(dtDate,txtAny)
SELECT#2003-09-03#,''blah'';

两者Access帮助和ADH97确认_before saved_版本是正确的语法,并且查询在两种形式中都能达到预期的效果,所以
它不会危及生命。然而,空闲的好奇心驱使我在主题栏中提出问题。

任何人都对这个问题有任何想法?
Access 97
If I select New on the Query tab of the db window, and go staight to sql
view and type in the following for example:

INSERT INTO tblMyTable ( dtDate, txtAny)
VALUES (#2003-09-03#, ''blah'');

and then save the query, close it, and then reopen by clicking the design
button so it opens in sql view. The sql has changed to:

INSERT INTO tblMyTable ( dtDate, txtAny)
SELECT #2003-09-03#, ''blah'';

Both Access Help and ADH97 confirm that the _before saved_ version is the
correct syntax, and the query does what is expected of it in both forms, so
it isn''t a life threatening situation. However, idle curiosity drives me to
ask the question in the subject line.

Anyone got any thoughts on the subject?




我在查询中发现的一个根本区别是在
中访问和SQL Server中的视图是Access很好地记住了上面表格的

位置,大小等。查询网格,SQL Server

没有。


我知道在SQL Server中它将SQL文本保存为视图并构建

table&即时加入图表。


我认为(我可能错了,因为我不知道它的内部结构)

Access是做的对面并存储所有这些属性,表格和/或
位置等等,并动态生成SQL文本。


-

A)bort,R)etry,I)用大锤敲击。


(用trevor代替sithlord发送电子邮件)



One of the fundamental differences I find between writing queries in
Access and views in SQL Server is that Access nicely remembers the
positions, sizes, etc of the tables above the query grid, SQL Server
doesn''t.

I know in SQL Server it saves the SQL text as the view and builds the
tables & joins diagram on the fly.

I think (and I may be wrong as I don''t know the internals of it) that
Access does the opposite and stores all those attributes, table
positions, etc for the diagram and generates the SQL Text on the fly.

--
A)bort, R)etry, I)nfluence with large hammer.

(replace sithlord with trevor for email)


这篇关于为什么Access会这样做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆