473,511 Members | 16,830 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 1715
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******@sPAmpatico.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.CustomerID, [Order Details].ProductID
FROM Orders LEFT JOIN [Order Details] ON Orders.OrderID = [Order
Details].OrderID;

SELECT Orders.CustomerID, [Order Details].ProductID
FROM Orders, [Order Details]
WHERE (((Orders.OrderID)=[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.com> 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.com:
On Fri, 05 Aug 2005 22:15:20 GMT, Bob Quintal
<rq******@sPAmpatico.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.CustomerID, [Order
Details].ProductID FROM Orders LEFT JOIN [Order Details] ON
Orders.OrderID = [Order Details].OrderID;

SELECT Orders.CustomerID, [Order Details].ProductID
FROM Orders, [Order Details]
WHERE (((Orders.OrderID)=[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
1933
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...
7
1668
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...
4
8842
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...
12
18649
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...
5
4021
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...
27
2275
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: ...
1
3088
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...
9
5742
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...
3
2370
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. ...
0
7355
Oralloy
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,...
0
7423
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...
1
7081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5066
isladogs
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...
0
4737
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...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3213
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1576
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 ...
0
447
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...

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.