473,671 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bisarre join problem.

Have two tables linked from SQL server into Access '97, one
containing an autonumber primary key and the second table has a
text field populated with
cstr([autonumber]).

I can create a query that contains a calculated field
Cstr([autonumber]) and do an inner join on that to the second
table. I can also create a query containing a calculated field Clng
(textfield) and do an inner join to the first table.

But if I change the join to left or right, trying to view the query
gives me an error report "illegal join"

Any suggestions for a workaround, I really need a left join.

I am not allowed to alter the SQL server tables, and my bug reports
and suggestions for improvement are met with evil stares and worse
from the I.T. department personnel.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #1
4 1726
Assuming you don't have development rights on the sql server, like to
create stored procedures, what I would do would be to pull the data from
your ODBC table into a local table (or pull the portion of data you
would use - based on like a date range). Then work with that local
table. Access should be way more forgiving this way.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #2
On Fri, 05 Aug 2005 22:15:20 GMT, Bob Quintal <rq******@sPAmp atico.ca>
wrote:

A join can always be rewritten as a whereclause. For example using the
Northwind sample application, these two queries are equivalent:
SELECT Orders.Customer ID, [Order Details].ProductID
FROM Orders LEFT JOIN [Order Details] ON Orders.OrderID = [Order
Details].OrderID;

SELECT Orders.Customer ID, [Order Details].ProductID
FROM Orders, [Order Details]
WHERE (((Orders.Order ID)=[Order Details].[OrderID] Or (Orders.OrderID )
Is Null));

-Tom.
Have two tables linked from SQL server into Access '97, one
containing an autonumber primary key and the second table has a
text field populated with
cstr([autonumber]).

I can create a query that contains a calculated field
Cstr([autonumber]) and do an inner join on that to the second
table. I can also create a query containing a calculated field Clng
(textfield) and do an inner join to the first table.

But if I change the join to left or right, trying to view the query
gives me an error report "illegal join"

Any suggestions for a workaround, I really need a left join.

I am not allowed to alter the SQL server tables, and my bug reports
and suggestions for improvement are met with evil stares and worse
from the I.T. department personnel.


Nov 13 '05 #3
On Fri, 05 Aug 2005 23:25:10 GMT, Rich P <rp*****@aol.co m> wrote:

But you would suffer terrible performance hits, assuming more than
trivial numbers of records.
-Tom.

Assuming you don't have development rights on the sql server, like to
create stored procedures, what I would do would be to pull the data from
your ODBC table into a local table (or pull the portion of data you
would use - based on like a date range). Then work with that local
table. Access should be way more forgiving this way.

Rich

*** Sent via Developersdex http://www.developersdex.com ***


Nov 13 '05 #4
Tom van Stiphout <no************ *@cox.net> wrote in
news:au******** *************** *********@4ax.c om:
On Fri, 05 Aug 2005 22:15:20 GMT, Bob Quintal
<rq******@sPAmp atico.ca> wrote:

A join can always be rewritten as a whereclause. For example
using the Northwind sample application, these two queries are
equivalent: SELECT Orders.Customer ID, [Order
Details].ProductID FROM Orders LEFT JOIN [Order Details] ON
Orders.OrderID = [Order Details].OrderID;

SELECT Orders.Customer ID, [Order Details].ProductID
FROM Orders, [Order Details]
WHERE (((Orders.Order ID)=[Order Details].[OrderID] Or
(Orders.OrderID ) Is Null));

-Tom.
Thanks Tom,It works. I still wonder why an inner join doesn't
generate the same error message as the left join.


Have two tables linked from SQL server into Access '97, one
containing an autonumber primary key and the second table has
a text field populated with
cstr([autonumber]).

I can create a query that contains a calculated field
Cstr([autonumber]) and do an inner join on that to the second
table. I can also create a query containing a calculated field
Clng (textfield) and do an inner join to the first table.

But if I change the join to left or right, trying to view the
query gives me an error report "illegal join"

Any suggestions for a workaround, I really need a left join.

I am not allowed to alter the SQL server tables, and my bug
reports and suggestions for improvement are met with evil
stares and worse from the I.T. department personnel.



--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1946
by: Bruce Duncan | last post by:
I'm a bit new to MySQL (know MS SQL well...and that may be the problem...getting the syntax confused) and I'm having a join problem...can anyone offer some help? Here's my problem: I have table1 that needs to "left" join to table1A, table1B, and table1C which is corrently done with the following: select table1.x, table1a.y, table1b.z, table1c.q from table1 left join table1a on table1.ID = table1a.ID left join table1b on table1.ID =...
7
1676
by: Greg | last post by:
I'm a quantitative securities analyst working with Compustat data (company fiscal reports and pricing feeds). My coworker came across a problem that we fixed, but I'd like to understand 'why' it was happening and just don't get it yet. Here's the starting query (reduced to simple prefixes): ----INITIAL-----
4
8852
by: Anthony Robinson | last post by:
I was actually just wondering if someone could possibly take a look and tell me what I may be doing wrong in this query? I keep getting ambiguous column errors and have no idea why...? Thanks in advance!!! SELECT AIM.AIMRETRIEVAL.AIMRETRIEVALID, AIM.AIMRETRIEVAL.DESCRIPTION, AIM.ARCHIVERETRIEVAL.ARCHIVERETRIEVALID, AIM.ARCHIVERETRIEVAL.STATUSID,
12
18665
by: Phil Powell | last post by:
<cfquery name="getAll" datasource="#request.dsn#"> SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn, U.choiceId, U.experience, T.label AS teamLabel, R.label AS roleLabel FROM User U LEFT JOIN UserTeamAssoc UTA ON UTA.userID = U.userID, Role R, UserRoleAssoc URA, Team T WHERE U.userID = URA.userID AND URA.roleID = R.roleID AND U.userId > 1
5
4040
by: jason.evans | last post by:
Hi there. I am having an intrigueing problem. I have a query which left joins another query to itself twice. The original query is derived from a linked table in SQLServer 2000. When I run it on my pc It runs fine. However for other users in the office, it behaves as an inner join. ie it only returns the records fo which the join fields equal each other. This happens on every other pc
27
2296
by: John Salerno | last post by:
Ok, here's a problem I've sort of assigned to myself for fun, but it's turning out to be quite a pain to wrap my mind around. It's from a puzzle game. It will help if you look at this image: http://www.johnjsal.devisland.net/switches.jpg Here's the situation: Each of the four rows in the diagram is considered a single 'panel'. Each panel has eight 'switches', which are composed of two columns each, and these columns have a total of 20...
1
3106
by: imranpariyani | last post by:
Hi i have a severe performance problem with one of my views which has 6 to 8 joins .. any help will be appreciated.. the view is: CREATE OR REPLACE VIEW thsn.trade_view AS SELECT tra.tra_id, tra.per_id, tra.fir_id, tra.tra_dcn, tra.tra_startdate::date AS tra_startdate, tra.tra_enddate::date AS tra_enddate, tra.tra_highprice, tra.tra_lowprice, tra.tra_shares, tra.tra_marketvalue, tra.tra_commonsharesheld, tra.tra_directsharesheld,...
9
5752
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just call it Express for simplicity). I have, to try to simplify things, put the exact same DB on two systems, one running MSDE and one running Express. Both have 2 Ghz processors (one Intel, one AMD), both have a decent amount of RAM (Intel system...
3
2383
by: Anila | last post by:
Hi Friends, My problem with Inner join is ... first i joined two tables and i got the result. after that iam trying to join one more table its giving syn tax error in JOIN condition. Here is the Query
0
8473
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8390
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8819
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8667
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2808
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.