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

Home Posts Topics Members FAQ

join

19 New Member
Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT emptable.empname, emptable.deptid, depttable.deptname from emptable inner join depttable 
  3. ON emptable.deptid = depttable.deptid 
  4.  
  5. ERROR at line 1:
  6. ORA-00933: SQL command not properly ended
  7.  
  8.  

i m using oracle8.. while trying to use join & its types i am getting this type of errors. plz any one tell me the answer
Mar 13 '08 #1
23 2398
amitpatel66
2,367 Recognized Expert Top Contributor
SELECT emptable.empnam e, emptable.deptid , depttable.deptn ame from emptable inner join depttable
ON emptable.deptid = depttable.depti d

ERROR at line 1:
ORA-00933: SQL command not properly ended


i m using oracle8.. while trying to use join & its types i am getting this type of errors. plz any one tell me the answer
Try this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT et.empname, et.deptid, dt.deptname from emptable et, depttable dt
  3. WHERE et.deptid = dt.deptid 
  4.  
  5.  
Mar 13 '08 #2
jaanutn
19 New Member
Try this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT et.empname, et.deptid, dt.deptname from emptable et, depttable dt
  3. WHERE et.deptid = dt.deptid 
  4.  
  5.  

wow ......... itz working. thank you very much..

actually what was the wrong in it? just waned to know
Mar 13 '08 #3
amitpatel66
2,367 Recognized Expert Top Contributor
wow ......... itz working. thank you very much..

actually what was the wrong in it? just waned to know
Instead of using INNER JOIN ketywords, I had given alias names to the tables and used the alias names to select the columns and in the WHERE clause.
Mar 13 '08 #4
jaanutn
19 New Member
Instead of using INNER JOIN ketywords, I had given alias names to the tables and used the alias names to select the columns and in the WHERE clause.

Expand|Select|Wrap|Line Numbers
  1. SQL> select emptable.empname, emptable.deptid, depttable.deptname from emptable, depttable 
  2. 2 where emptable.deptid = depttable.deptid 
  3. 3 /
  4.  
  5. EMPNAME DEPTID DEPTNAME
  6. ------------------------- --------- -------------------------
  7. rafferty 31 sales
  8. jones 33 engineering
  9. steinberg 33 engineering
  10. smith 34 clerical
  11. robinson 34 clerical
  12.  
if i gave like this it is working... but if i use inner join word or left outer join word , it is not working.. wht should i give 4 inner join?
Mar 13 '08 #5
amitpatel66
2,367 Recognized Expert Top Contributor
Try this

Expand|Select|Wrap|Line Numbers
  1.  
  2. select emptable.empname, emptable.deptid, depttable.deptname from emptable JOIN depttable ON emptable.deptid = depttable.deptid 
  3.  
  4.  
Mar 13 '08 #6
jaanutn
19 New Member
Try this

Expand|Select|Wrap|Line Numbers
  1.  
  2. select emptable.empname, emptable.deptid, depttable.deptname from emptable JOIN depttable ON emptable.deptid = depttable.deptid 
  3.  
  4.  

Expand|Select|Wrap|Line Numbers
  1. SQL> SELECT emptable.empname, emptable.deptid, depttable.deptname FROM emptable JOIN depttable ON em
  2. ptable.deptid = depttable.deptid
  3. 2 ;
  4. SELECT emptable.empname, emptable.deptid, depttable.deptname FROM emptable JOIN depttable ON emptabl
  5. *
  6. ERROR at line 1:
  7. ORA-00933: SQL command not properly ended
  8.  
  9.  
i tried this too.. bt got error
Mar 13 '08 #7
amitpatel66
2,367 Recognized Expert Top Contributor
It is suported from Oracle 9i version and not in 8i

Check www.dba-oracle.com/oracle_news/2004_2_19_rittm an.htm
Mar 13 '08 #8
jaanutn
19 New Member
It is suported from Oracle 9i version and not in 8i

Check www.dba-oracle.com/oracle_news/2004_2_19_rittm an.htm

[quote]

thank u for the info..

how to delete empty records & similar data records(does not have primary key) in the table?
Mar 13 '08 #9
amitpatel66
2,367 Recognized Expert Top Contributor
[quote=jaanutn]

thank u for the info..

how to delete empty records & similar data records(does not have primary key) in the table?
post what you have tried for?

There should be some column that can be used to find out the duplicates and delete them.
Mar 13 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3062
by: B. Fongo | last post by:
I learned MySQL last year without putting it into action; that is why I face trouble in formulating my queries. Were it a test, then you would have passed it, because your queries did help me solve my problem. I'll turn to MySQL doc after getting through this pressing project. Thanks a lot Roger! Babale -----Urspr=FCngliche Nachricht-----
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 =...
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...
1
2266
by: Beachvolleyballer | last post by:
hi there anyone had an idea to join following 2 queries to 1???? ----- QUERY 1 --------------------------------------------- SELECT TMS_CaseF_2.Name AS TCDomain_0, TMS_CaseF_3.Name AS TCDomain_1, TMS.CaseF.Name AS TCFolder_2, TMS_CaseF_1.Name AS TCFolder_3,
8
4968
by: Matt | last post by:
Hello I have to tables ar and arb, ar holds articles and a swedish description, arb holds descriptions in other languages. I want to retreive all articles that match a criteria from ar and also display their corresponding entries in arb, but if there is NO entry in arb I still want it to show up as NULL or something, so that I can get the attention that there IS no language associated with that article.
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-----
3
23088
by: Ian Boyd | last post by:
i know nothing about DB2, but i'm sure this must be possible. i'm trying to get a client to create a view (which it turns out is called a "Logical" in DB2). The query needs a LEFT OUTER JOIN, but he doesn't know how to do that, or even if he can, and i don't have to time to learn DB2 from scratch right now. The following SQL Query is a trimmed sample of the full View (i.e. Logical) definition - and i would create it on an SQL based...
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
52
6314
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
12
13181
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
0
8474
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
8392
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
8912
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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...
1
8597
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
8669
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...
1
6222
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4403
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.