这个SQL可以在Access / Jet中工作吗? [英] Can This SQL Work in Access/Jet?
问题描述
大家好,
我有一个熟人正在做一些A2003开发,他们在另一个论坛(不是技术论坛)上提出问题。关于他有一个SQL
问题。
据我所知,他*是*使用Jet作为数据库引擎,但他
表示如下声明正在起作用:
SELECT orders.ordersid,
recipies.recipiestitle,
orderscontent.ocquantity,orderscontent.ocissplit
FROM Orders,OrdersContent,Recipies
WHERE Orders.Orders_SessionsID = MMColParam
AND Orders。 OrdersID = OrdersContent.OC_OrdersID
AND OrdersContent.OC_MC_RecipiesID = Recipies.RecipiesID
这是怎么回事?
在where子句中指定的join结构是人们通常在Oracle中执行的操作,而不是Jet。据我所知,甚至不是MS SQL。
有何评论?我真的很乐意帮助他正确引导他,因为我担心他会像上面那样使用SQL制作他的项目的哈希值,但是
am我错了?这样的结构可以在Access / Jet中使用吗?
非常感谢。
-
Tim http://www.ucs.mun.ca/~tmarshal/
^ o<
/#)" Burp-beep,burp-beep,burp-beep?" - Quaker Jake
/ ^^Whatcha doin? - 同上TIM-MAY !! - 我
Hi everyone,
I have an acquaintance who is doing some A2003 development who was
asking a question on another forum (not a technical one) about an SQL
problem he''s having.
As far as I can tell, he *is* using Jet as the database engine, yet he
says a statement like the following is working:
SELECT orders.ordersid,
recipies.recipiestitle,
orderscontent.ocquantity,orderscontent.ocissplit
FROM Orders, OrdersContent, Recipies
WHERE Orders.Orders_SessionsID = MMColParam
AND Orders.OrdersID = OrdersContent.OC_OrdersID
AND OrdersContent.OC_MC_RecipiesID = Recipies.RecipiesID
How is this?
The join structure, specified in the where clause, is what one would
normally do in Oracle and not Jet. Not even MS SQL as far as I know.
Any comments? I''d really like to help steer him correctly as I fear
he''s going to make a hash of his project using SQL like the above, but
am I wrong? Can a structure like this work in Access/Jet?
Thanks very much.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
推荐答案
Tim Marshall写道:
Tim Marshall wrote:
连接结构,在where子句,是人们在Oracle中通常做的事情,而不是Jet。据我所知,甚至不是MS SQL。
The join structure, specified in the where clause, is what one would
normally do in Oracle and not Jet. Not even MS SQL as far as I know.
嗯,我会吵吵嚷嚷。我刚试过,从我的一个喷气机应用程序:
SELECT ord_act_abbrev,unt_name,unt_code
FROM tbl_orders,tbl_units
WHERE ord_unt_fk = unt_pk
以上是甲骨文键入join。以下是Access
查询构建器构造SQL的方式:
SELECT tbl_orders.ORD_ACT_ABBREV,tbl_units.UNT_NAME,tbl_units.UNT_CODE
FROM tbl_orders INNER JOIN tbl_units ON tbl_orders.ORD_UNT_FK =
tbl_units.UNT_PK
两者都给出相同的结果!!!!!!
发生了什么事?
-
Tim http://www.ucs.mun.ca/~tmarshal/
^ o<
/#)" Burp-beep,burp-beep,burp-beep?" - Quaker Jake
/ ^^Whatcha doin? - 同上TIM-MAY !! - 我
Well, I''ll be hornswaggled. I just tried, from one of my jet applications:
SELECT ord_act_abbrev, unt_name, unt_code
FROM tbl_orders, tbl_units
WHERE ord_unt_fk = unt_pk
The above is an "Oracle" type join. The following is how the Access
query builder constructs the SQL:
SELECT tbl_orders.ORD_ACT_ABBREV, tbl_units.UNT_NAME, tbl_units.UNT_CODE
FROM tbl_orders INNER JOIN tbl_units ON tbl_orders.ORD_UNT_FK =
tbl_units.UNT_PK
Both give the same results!!!!!!
What is going on?
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
>发生了什么?
您是否询问某些数据库引擎是否足够灵活识别
那...
SELECT foo.bar,baz.thing
FROM foo,baz
在哪里foo.key = baz.key
....在功能上相当于...
SELECT foo.bar,baz。东西
来自foo INNER JOIN baz
ON foo.key = baz.key
....?
根据我的经验,其中一些是。如果Jet是其中之一,那应该是
毫不奇怪。
Gord
Tim Marshall写道:
>What is going on?
Are you asking if some database engines are nimble enough to recognize
that...
SELECT foo.bar, baz.thing
FROM foo, baz
WHERE foo.key=baz.key
....is functionally equivalent to...
SELECT foo.bar, baz.thing
FROM foo INNER JOIN baz
ON foo.key=baz.key
....?
In my experience, some of them are. If Jet is among them, it should be
of no surprise.
Gord
Tim Marshall wrote:
Tim Marshall写道:
Tim Marshall wrote:
在where子句中指定的连接结构是人们的意思
通常在Oracle而不是Jet中执行。据我所知,甚至不是MS SQL。
The join structure, specified in the where clause, is what one would
normally do in Oracle and not Jet. Not even MS SQL as far as I know.
好吧,我会吵吵嚷嚷。我刚试过,从我的一个喷气机应用程序:
SELECT ord_act_abbrev,unt_name,unt_code
FROM tbl_orders,tbl_units
WHERE ord_unt_fk = unt_pk
以上是甲骨文键入join。以下是Access
查询构建器构造SQL的方式:
SELECT tbl_orders.ORD_ACT_ABBREV,tbl_units.UNT_NAME,tbl_units.UNT_CODE
FROM tbl_orders INNER JOIN tbl_units ON tbl_orders.ORD_UNT_FK =
tbl_units.UNT_PK
两者都给出相同的结果!!!!!!
发生了什么事?
-
Tim http://www.ucs.mun.ca/~tmarshal/
^ o<
/#)" Burp-beep,burp-beep,burp-beep?" - Quaker Jake
/ ^^Whatcha doin? - 同上TIM-MAY !! - Me
Well, I''ll be hornswaggled. I just tried, from one of my jet applications:
SELECT ord_act_abbrev, unt_name, unt_code
FROM tbl_orders, tbl_units
WHERE ord_unt_fk = unt_pk
The above is an "Oracle" type join. The following is how the Access
query builder constructs the SQL:
SELECT tbl_orders.ORD_ACT_ABBREV, tbl_units.UNT_NAME, tbl_units.UNT_CODE
FROM tbl_orders INNER JOIN tbl_units ON tbl_orders.ORD_UNT_FK =
tbl_units.UNT_PK
Both give the same results!!!!!!
What is going on?
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
2006年11月2日星期四22:04:23 -0330,Tim Marshall
< TI ** **@PurplePandaChasers.Moertheriumwrote:
这在所有3种环境中似乎都是合法的语法:一个带有where子句的bhesus产品
。
-Tom。
On Thu, 02 Nov 2006 22:04:23 -0330, Tim Marshall
<TI****@PurplePandaChasers.Moertheriumwrote:
This seems legal syntax in all 3 environments: a carthesian product
with a where clause.
-Tom.
> Tim Marshall写道:
>Tim Marshall wrote:
>在where子句中指定的连接结构是人们通常在Oracle中执行的操作,而不是Jet。据我所知,甚至不是MS SQL。
>The join structure, specified in the where clause, is what one would
normally do in Oracle and not Jet. Not even MS SQL as far as I know.
嗯,我会变得笨手笨脚。我刚从我的一个喷气机应用程序中尝试过:
SELECT ord_act_abbrev,unt_name,unt_code
FROM tbl_orders,tbl_units
WHERE ord_unt_fk = unt_pk
以上是Oracle。键入join。以下是Access
查询构建器构造SQL的方式:
SELECT tbl_orders.ORD_ACT_ABBREV,tbl_units.UNT_NAME,tbl_units.UNT_CODE
FROM tbl_orders INNER JOIN tbl_units ON tbl_orders.ORD_UNT_FK =
tbl_units.UNT_PK
两者都给出了相同的结果!!!!!!
是怎么回事?
Well, I''ll be hornswaggled. I just tried, from one of my jet applications:
SELECT ord_act_abbrev, unt_name, unt_code
FROM tbl_orders, tbl_units
WHERE ord_unt_fk = unt_pk
The above is an "Oracle" type join. The following is how the Access
query builder constructs the SQL:
SELECT tbl_orders.ORD_ACT_ABBREV, tbl_units.UNT_NAME, tbl_units.UNT_CODE
FROM tbl_orders INNER JOIN tbl_units ON tbl_orders.ORD_UNT_FK =
tbl_units.UNT_PK
Both give the same results!!!!!!
What is going on?
这篇关于这个SQL可以在Access / Jet中工作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!