Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: NEWBIE ?: SQL command not properly ended

Re: NEWBIE ?: SQL command not properly ended

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 28 Jan 2003 00:09:09 -0800
Message-ID: <92eeeff0.0301280009.3cccd72c@posting.google.com>


speedback_at_rocketmail.com (Steve) wrote in message news:<1be7a470.0301271930.5f17b8c5_at_posting.google.com>...
> I just installed Oracle 9i Personal edition on my Windows XP Pro
> laptop and am having a difficult time getting going. Just to test out
> some queries I tried running a extremely simple SQL statement against
> the database:
>
> SELECT * FROM EMX.HR.DEPARTMENT;
>
> When executing the query I get ERROR at line 1: ORA-00933: SQL command
> not properly ended. Someone help, I'm getting depressed that I can't
> execute the simplest of queries!!!

You are probably confusing Oracle with Sqlserver. This is an incorrect syntax. In Oracle, when you reference a table/view in the from clause, you only need to use the table/view name if the user whom you are logged in as owns it,

SELECT * FROM DEPARTMENT; OR If another user owns the table with you as a logged in user having select priviliges on it, then you just prefix the table owner's schema|username,

SELECT * FROM <Schema|username>.DEPARTMENT;

Regards
/Rauf Sarwar Received on Tue Jan 28 2003 - 02:09:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US