I have the following query in Access:
SELECT a.interest_parent_id, a.interest_element_id, b.alr_category_id AS
interest_category_id, a.allergy_parent_id, a.allergy_element_id,
c.alr_category_id AS allergy_category_id
FROM (AllergyDrugPermutation AS a INNER JOIN alr_category_drug_map AS b ON
a.interest_element_id = b.drug_id) INNER JOIN alr_category_drug_map AS c ON
a.allergy_element_id = c.drug_id
and all is well!
When I create the same query in SQL sever (using the desinger), I get:
SELECT a.interest_parent_id, a.interest_element_id, b.alr_category_id AS
interest_category_id, a.allergy_parent_id, a.allergy_element_id,
c.alr_category_id AS allergy_category_id
FROM dbo.AllergyDrugPermutation a INNER JOIN
dbo.alr_category_drug_map b ON a.interest_element_id =
b.drug_id INNER JOIN
dbo.alr_category_drug_map c ON a.allergy_element_id =
c.drug_id
The only structural difference I see here is that SQL removed the ( and )
from around the first join and created the double join.
When I run this query I get stuck in a loop and eventually the sever will
time out. If I only have the first join there is no time out issues but of
course the result is not what I desire.
Can someone help me out here and tell me what is wrong with the statement
used in SQL?
Thank you in advance,
Eric 3 2201
I think I found the problem. AllergyDrugPermutation is a "view." If I
create a table the has the same data as that in the view I don't get the
time out error.
So the question becomes, why does this fail with view?
Thanks
Eric
"Beringer" <bo*********@invalid.com> wrote in message
news:mbSdd.56308$kz3.48760@fed1read02... I have the following query in Access:
SELECT a.interest_parent_id, a.interest_element_id, b.alr_category_id AS interest_category_id, a.allergy_parent_id, a.allergy_element_id, c.alr_category_id AS allergy_category_id FROM (AllergyDrugPermutation AS a INNER JOIN alr_category_drug_map AS b ON a.interest_element_id = b.drug_id) INNER JOIN alr_category_drug_map AS c ON a.allergy_element_id = c.drug_id
and all is well!
When I create the same query in SQL sever (using the desinger), I get:
SELECT a.interest_parent_id, a.interest_element_id, b.alr_category_id AS interest_category_id, a.allergy_parent_id, a.allergy_element_id, c.alr_category_id AS allergy_category_id FROM dbo.AllergyDrugPermutation a INNER JOIN dbo.alr_category_drug_map b ON a.interest_element_id = b.drug_id INNER JOIN dbo.alr_category_drug_map c ON a.allergy_element_id = c.drug_id
The only structural difference I see here is that SQL removed the ( and ) from around the first join and created the double join. When I run this query I get stuck in a loop and eventually the sever will time out. If I only have the first join there is no time out issues but of course the result is not what I desire.
Can someone help me out here and tell me what is wrong with the statement used in SQL?
Thank you in advance, Eric
Did you get any error message when the query timeout occured?
Hi
You would need to post DDL and example data (as insert statements) that
recreates the problem http://www.aspfaq.com/etiquette.asp?id=5006
If you posted the access query (from the access designer) into query
analyser do you still have a problem?
John
"Beringer" <bo*********@invalid.com> wrote in message
news:1mSdd.56309$kz3.53477@fed1read02... I think I found the problem. AllergyDrugPermutation is a "view." If I create a table the has the same data as that in the view I don't get the time out error. So the question becomes, why does this fail with view? Thanks Eric
"Beringer" <bo*********@invalid.com> wrote in message news:mbSdd.56308$kz3.48760@fed1read02...I have the following query in Access:
SELECT a.interest_parent_id, a.interest_element_id, b.alr_category_id AS interest_category_id, a.allergy_parent_id, a.allergy_element_id, c.alr_category_id AS allergy_category_id FROM (AllergyDrugPermutation AS a INNER JOIN alr_category_drug_map AS b
ON a.interest_element_id = b.drug_id) INNER JOIN alr_category_drug_map AS c ON a.allergy_element_id = c.drug_id
and all is well!
When I create the same query in SQL sever (using the desinger), I get:
SELECT a.interest_parent_id, a.interest_element_id,
b.alr_category_id AS interest_category_id, a.allergy_parent_id, a.allergy_element_id, c.alr_category_id AS allergy_category_id FROM dbo.AllergyDrugPermutation a INNER JOIN dbo.alr_category_drug_map b ON
a.interest_element_id = b.drug_id INNER JOIN dbo.alr_category_drug_map c ON a.allergy_element_id
= c.drug_id
The only structural difference I see here is that SQL removed the (
and ) from around the first join and created the double join. When I run this query I get stuck in a loop and eventually the sever
will time out. If I only have the first join there is no time out issues but of course the result is not what I desire.
Can someone help me out here and tell me what is wrong with the
statement used in SQL?
Thank you in advance, Eric
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Glen Scott |
last post by:
Hi, I'm writing an ASP app that administers an ISA server remotely.
The fact that it's an ISA server isn't my problem I believe.
My question? What is the security difference between disabling...
|
by: bdwise |
last post by:
What is the difference between a Panel and a <div> tag with
runat="server"? It seems that I can add child controls to either one
in a code-behind and they both render to a <div> anyway at runtime....
|
by: James |
last post by:
Can someone explain the fundamental difference between creating a "multi
user" version of an Access DB and creating a client-server Access DB?
ie why can't all the users on my network just click...
|
by: Eric Layman |
last post by:
Hi,
What's the difference between a normal web element:
<input type="text" id="txtname" name="txtname" runat="server">
vs webcontrol text box:
<asp:Textbox id="username" Columns="10"...
|
by: bharathreddy |
last post by:
This Article gives an introduction to VSTS Team Foundation & fundamental difference between Visual Source Safe (VSS) and VSTS Team Foundation.
Team Foundation is a set of tools and technologies...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |