Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

joins and undescriptive errors

Posted on 2006-06-13
9
378 Views
Last Modified: 2012-05-05
I'm annoyed at how generic the errors of Oracle are.

I'm fairly experienced on other SQLs, very inexperienced in Oracle...
This query looks find to me:

SELECT
  SUBSTR(d.name,1,9) AS customer_id,
  it.x_directory,
  it.x_prod_issue_num,
  i.row_id,
  i.src_row_id,
  i.x_line_type,
  i.x_text_data,
  i.x_text_grf_tel_id,
  i.x_text_seq_num,
  i.x_text_gn,
  it.x_item_id
FROM
  siebel.s_note_quote_it i
LEFT JOIN siebel.s_quote_item it ON  i.src_row_id = it.row_id
LEFT JOIN siebel.s_doc_quote d ON it.sd_id = d.row_id
WHERE
((i.LAST_UPD > '12-jun-2006' and i.LAST_UPD_BY = '1-69LRD') or (i.CREATED > '12-jun-2006' and i.CREATED_BY = '1-69LRD'))
GO

And yet I get a very undescriptive error:

 ORA-00933: SQL command not properly ended

Anyone have any ideas?
0
Comment
Question by:MoriPi
  • 5
  • 4
9 Comments
 
LVL 1

Expert Comment

by:primusmagestri
ID: 16900336
what is that GO at the end?
0
 

Author Comment

by:MoriPi
ID: 16900441
Thats not it.
Quirk of Aqua Data Studio/Oracle combination.  Thou shalt have GO.

Brian
0
 
LVL 1

Expert Comment

by:primusmagestri
ID: 16900622
then you are either not using a good tool or not being attentive enough :)
even plain SQLPlus would indicate something like:

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

Other tools ommit that line number but get you to the problematic line. try that sql in an SQLPlus session and see the result.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:MoriPi
ID: 16908009
True... However I left that line out to ensure brevity:
>[Error] Script lines: 1-19 -------------------------
 ORA-00933: SQL command not properly ended 

Which translates as "its somewhere between lines 1 and 19".  Which is _really_ helpful lol.

Brian
0
 
LVL 1

Expert Comment

by:primusmagestri
ID: 16909205
have you tried that in an SQLPlus session? that doesn't seem to be an SQLPlus kind of message...
0
 

Author Comment

by:MoriPi
ID: 16909242
I'm pretty sure its something to do with the JOIN.. Only seems tohappen with the join.

Brian
0
 
LVL 1

Accepted Solution

by:
primusmagestri earned 50 total points
ID: 16909538
I tried to rectreate your situation - created tables with the same columns as yours. I did that just to make sure I have the exact same situation, because other than that GO at the end there seem to be no problem. Look what I got in SQLPlus:

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

Now, there are a couple of things:
1.You are using a bad tool
2.You are stubborn and do not want to try your script in an SQLPlus session to see the real problem
3.For 50 points it's not worth trying to convince you, I don't even know why I continued after my first comment in here...
0
 

Author Comment

by:MoriPi
ID: 16909578
Sorry primusmage.. Only starting on Oracle...  I'm used to MSSQL and Sybase..  Actually don't know if I have SQLPlus installed; and I had a testing deadline today.
heh. sorry for your trouble.  and thanks for your attempt.  I have since found its because its Oracle 8 which aparently doen't support ANSI joins.. *shrugs*
But for your trouble you win.
0
 
LVL 1

Expert Comment

by:primusmagestri
ID: 16909608
oh, well, that's a problem, too... Indeed, ANSI joins are only supported starting 9i.
SQLPlus is a tool that comes with every server or client installation of Oracle, it's the most basic tool. In order to ease your struggle with Oracle, I would suggest trying PL/SQL Developer from Allround Automatitions, it's a great tool.

good luck!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question