Questions tagged [ora-00933]

SQL command not properly ended. Cause: You tried to execute an SQL statement with an inappropriate clause.

Cause: The SQL statement ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement. ORDER BY cannot be used to create an ordered view or to insert in a certain order.

Action: Correct the syntax by removing the inappropriate clauses. It may be possible to duplicate the removed clause with another SQL statement. For example, to order the rows of a view, do so when querying the view and not when creating it. This error can also occur in SQL*Forms applications if a continuation line is indented. Check for indented lines and delete these spaces.

98 questions
365
votes
15 answers

Update statement with inner join on Oracle

I have a query which works fine in MySQL, but when I run it on Oracle I get the following error: SQL Error: ORA-00933: SQL command not properly ended 00933. 00000 - "SQL command not properly ended" The query is: UPDATE table1 INNER JOIN table2…
user169743
  • 4,067
  • 5
  • 19
  • 14
88
votes
5 answers

how to modify an existing check constraint?

Is there any way to modify an existing check constraint on a table other than dropping and re-creating it? create table t ( n number); ora10g> Tabelle wurde erstellt. ora10g> alter table t add constraint ck check(n>0); Tabelle wurde…
schurik
  • 7,798
  • 2
  • 23
  • 29
23
votes
4 answers

SQL Inner join on select statements

I am trying to make an inner join on a select statement like this: select * from (select* from bars where rownum <= 10 )as tab1 inner join (select * from bars where rownum <= 10 )as tab2 on tab1.close=tab2.close and I get the following…
user235693
  • 371
  • 2
  • 4
  • 9
12
votes
1 answer

Modify unique constraint in Oracle

I need to update an existing constraint in Oracle database to add a new column there. ALTER TABLE MY_PARTNER_DETAILS MODIFY CONSTRAINT UQ_MY_PARTNER_DETAILS UNIQUE(PARTNER_CODE,PGOOD_CODE,SITE_CODE,PARTNER_PLACEMENT,PARTNER_PARTICIPATION) Gives…
wheleph
  • 7,974
  • 7
  • 40
  • 57
9
votes
2 answers

SQL Command not properly ended?

I am using a SQL statement with a Temporary relation, and am getting the error ORA-009933: SQL command not properly ended I don't see anything wrong with the statement, so any assistance is greatly appreciated. The statement is: SELECT Temp.name, …
Paul Woidke
  • 928
  • 4
  • 18
  • 40
9
votes
4 answers

Getting inserted ID after INSERT ... SELECT on Oracle

This SQL statement works if I run it from my Oracle client (SQL Developer): insert into Person (Name) select 'Bob' from dual It also works if I issue it via Spring JDBC, without using a KeyHolder: final PreparedStatementCreator psc = new…
Andrew Swan
  • 13,427
  • 22
  • 69
  • 98
7
votes
3 answers

Update with self-join

I want to update a table to indicate that some rows are parents of others, so I added a "parentid" column to the table. The following query finds all the parents: SELECT ca1.id, ca2.id FROM contactassociations ca1 JOIN contactassociations ca2 ON…
Paul Tomblin
  • 179,021
  • 58
  • 319
  • 408
7
votes
1 answer

Oracle syntax error

I got the following error in Oracle: SELECT * FROM abcd WHERE name LIKE 'a%' LIMIT 10 * ERROR at line 1: ORA-00933: SQL command not properly ended What is the problem with the command?
6
votes
2 answers

Oracle 12.2 - Replacement of NOPARTITION feature

I have Oracle version 12.2.0.1.0 We have generic script which create sequence that need to be reuse for different objects (by renaming sequence name): CREATE SEQUENCE NAME_SEQ MINVALUE 1 MAXVALUE 999999999 INCREMENT BY 1 START WITH 100 CACHE 200…
Ori Marko
  • 56,308
  • 23
  • 131
  • 233
6
votes
3 answers

PLS-00103: Encountered the symbol "end-of-file" in simple update block

The following Oracle statement: DECLARE ID NUMBER; BEGIN UPDATE myusername.terrainMap SET playerID = :playerID,tileLayout = :tileLayout WHERE ID = :ID END; Gives me the following error: ORA-06550: line 6, column 15: PL/SQL: ORA-00933:…
rageingnonsense
  • 93
  • 1
  • 2
  • 7
5
votes
10 answers

ORA-00933: SQL command not properly ended

I'm using OLEDB provider for ADO.Net connecting to an Oracle database. In my loop, I am doing an insert: insert into ps_tl_compleave_tbl values('2626899', 0, TO_DATE('01/01/2002', 'MM/DD/YYYY'), 'LTKN', 'LTKN', '52', TO_DATE('01/01/2002',…
Steve Horn
  • 8,818
  • 11
  • 45
  • 60
5
votes
3 answers

Update SQL with two tables in Oracle

I have a sql like this UPDATE A SET A.TEMSILCI_KOD = 4 FROM S_MUSTERI A, S_TEKLIF B WHERE A.TEMSILCI_KOD = 9 AND B.BAYI_KOD = 17 AND A.HESAP_NO = B.HESAP_NO But i getting an error like this Error starting at line 8 in command: UPDATE A SET…
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
5
votes
3 answers

Oracle: Order by Union returning ORA-00933: SQL command not properly ended

I have an issue with using Oracle's union and order by clauses together. I have two complex queries (with sub queries in them) having an order by clause for each of them. I need to union the output of both and return the result. When I run it, I am…
user2928913
  • 223
  • 1
  • 6
  • 15
5
votes
2 answers

ora-00933:SQL command not properly ended

I have the following code: begin for i in 1..2 loop insert into dba_xy.despatch select desp_id_seq.nextval, dbms_random.string('U',5), trunc(dbms_random.value(0000,9999)), prod_id from dba_xy.product prod_name from…
taksIV
  • 121
  • 2
  • 3
  • 8
3
votes
2 answers

Oracle Synonyms issue

My Scenario: Schema name: schema1 Package name: pkg_system procedure name: proc1 Now I am trying to create a synonyms for my proc1 as below CREATE PUBLIC SYNONYM call_proc FOR schema1.pkg_system.proc1; ...but it gave me syntax error. ORA-00933:…
niceApp
  • 2,913
  • 8
  • 35
  • 36
1
2 3 4 5 6 7