Solved

joins and undescriptive errors

Posted on 2006-06-13
9
382 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
[X]
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
  • 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
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, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to recover a database from a user managed backup
Suggested Courses

617 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