473,698 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why can I only use INNER JOIN

Hello.

In the following query:

SELECT tblDokumentiDet ails.ID_Artikel , - tblDokumentiDet ails.Kolicina
AS Kolicina
FROM (tblDokumenti INNER JOIN tblDokumentiDet ails ON
tblDokumenti.ID _Dokument = tblDokumentiDet ails.ID_Dokumen t) INNER JOIN
[SELECT tblDokumentiDet ails.ID_Artikel , Max(tblDokument i.Datum) AS
ZadnjiDatum
FROM tblDokumenti INNER JOIN tblDokumentiDet ails ON
tblDokumenti.ID _Dokument = tblDokumentiDet ails.ID_Dokumen t
WHERE tblDokumenti.ID _Vrsta=3 And tblDokumenti.St orniran=false And
tblDokumenti.Za kljucen=true
GROUP BY tblDokumentiDet ails.ID_Artikel]. AS ZadnjaInventura ON
(tblDokumentiDe tails.ID_Artike l = ZadnjaInventura .ID_Artikel) AND
(ZadnjaInventur a.ZadnjiDatum < tblDokumenti.Da tum)
WHERE tblDokumenti.ID _Vrsta = 2 And tblDokumenti.St orniran=false And
tblDokumenti.Za kljucen=true;
I want to use LEFT JOIN instead of INNER JOIN at second join (INNER
JOIN [SELECT...), but I get error: Join expression not supported. Can
you help me please? Must I put parentheses some way there? What is the
use of "[" and "]."?

May 20 '07 #1
3 2928
What is the
use of "[" and "]."?
The [ ]. denotes a sub-query. in this case you are joining to a sub-
query named ZadnjaInventura .

The access treatment of SQL code behind sub-queries is a little odd.
When editing a query with a sub-query in the SQL editor, you need to
replace the "[...]. AS ..." with "(...) AS ...", otherwise the jet
compiler won't be able to handle it. Once you edit in the graphic
editor, it converts it back to the "[...]. AS ..." format.

So try either:
1. edit the whole thing in the graphic editor - double click the line
representing the join and select from the options to create a left
join, or
2. edit in the SQL editor, but always replace "[" with "(" and "]."
with ")" before you run it

Good luck

May 21 '07 #2
graphic editor complains something... when I replace "[" and "]." with
"(", ")" it stil works. But when I change INNER to LEFT (JOIN) same
error. grrr.

BillCo je napisal:
What is the
use of "[" and "]."?

The [ ]. denotes a sub-query. in this case you are joining to a sub-
query named ZadnjaInventura .

The access treatment of SQL code behind sub-queries is a little odd.
When editing a query with a sub-query in the SQL editor, you need to
replace the "[...]. AS ..." with "(...) AS ...", otherwise the jet
compiler won't be able to handle it. Once you edit in the graphic
editor, it converts it back to the "[...]. AS ..." format.

So try either:
1. edit the whole thing in the graphic editor - double click the line
representing the join and select from the options to create a left
join, or
2. edit in the SQL editor, but always replace "[" with "(" and "]."
with ")" before you run it

Good luck
May 21 '07 #3
On May 21, 8:50 pm, janko.klemen... @gmail.com wrote:
graphic editor complains something... when I replace "[" and "]." with
"(", ")" it stil works. But when I change INNER to LEFT (JOIN) same
error. grrr.
that's odd - check for data corruption in the tables and make sure the
the joined fields have the exact same data type attributes. beyond
that i'm mystified as you!

May 22 '07 #4

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

Similar topics

3
3347
by: Ike | last post by:
Oh I have a nasty query which runs incredibly slowly. I am running MySQL 4.0.20-standard. Thus, in trying to expedite the query, I am trying to set indexes in my tables. My query requires four inner joins, as follows : SELECT DISTINCT upcards.id,statuskey.status,upcards.firstname,upcards.lastname,originkey.ori gin,associatekey.username,associatekey2.username,upcards.deleted FROM upcards,status,origins,associates INNER JOIN status...
3
6412
by: Prem | last post by:
Hi, I am having many problems with inner join. my first problem is : 1) I want to know the precedance while evaluating query with multiple joins. eg. select Employees.FirstName, Employees.LastName, TerritoryID, Employees.EmployeeID, RegionID, ProductID from Employees
4
23901
by: Nathan | last post by:
I have an application that uses an Access database to gather information on students' test scores. In the database there are three tables which are joined by one- to-many relationships: Students, Subjects, and Tests. I am trying to create a query that joins these three tables and show all the subjects for only one student, and all the tests taken in each of those subjects. This is the query I have entered in the Query Builder: ...
6
9309
by: dmonroe | last post by:
hi group -- Im having a nested inner join problem with an Access SQl statement/Query design. Im running the query from ASP and not usng the access interface at all. Here's the tables: tblEmployees empId -- EmpName -- EmpRole -- EmpManager -------....------------.... ---------....--------------- 1........ dan yella..........1..........2
52
6325
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible variations(combination of fields), - then act on each group in some way ...eg ProcessRs (oRs as RecordSet)... the following query will get me the distinct groups
3
16502
by: Zeff | last post by:
Hi all, I have a relational database, where all info is kept in separate tables and just the id's from those tables are stored in one central table (tblMaster)... I want to perform a query, so all data from the separate tables is shown in a view (instead of the reference id's pointing to the separate tables...) I have some troubles formulating the SQL statement: I tried:
12
13186
by: Chamnap | last post by:
Hello, everyone I have one question about the standard join and inner join, which one is faster and more reliable? Can you recommend me to use? Please, explain me... Thanks Chamnap
1
4604
by: teneesh | last post by:
Here I have a code for a view that has been created by a developer on my team. I am trying to use the very same code to create a view for a different formid/quesid. But I cannot figure out how this one starts and ends. can someone please help. here's the code from the developer. SELECT a.EvalRecNo, w1.q1, w2.q2, w3.q3, w4.q4, w5.q5, w6.comment FROM (SELECT DISTINCT u.EvalRecNo FROM dbo.UData AS u...
2
4476
by: MATTXtwo | last post by:
I have this store procedure to select data from table with join like this...SELECT tblPeribadi.Personel_No, tblPeribadi.Nama,tblCompany.Keterangan as Company_Code, tblPeribadi.Jawatan, tblPeribadi.Taraf_Jawatan, tblGroup.Keterangan AS Kumpulan,tblPeribadi.Gred,tblBusiness_Area.Keterangan AS Business_Area,tblCost_Center.Keterangan AS Kod_Pusat_Kos, tblPeribadi.IC_Baru, tblPeribadi.IC_Lama, ...
4
3350
by: AXESMI59 | last post by:
I created a query in the Access Query Builder that I modified to use with VBA Code so I could reuse it for any record I choose. The one that I created with the Access Query builder works beautifully with the hardcoded criteria. The VBA version with my criteria being set by a variable returns Error 3021. I am using a DAO Recordset and all I want to do is retrieve the data to place into a report. The Original made in the Access Query Builder:...
0
8680
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
8609
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
9030
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...
1
8899
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5861
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();...
0
4371
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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
3
2007
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.