Questions tagged [ora-00905]

ORA-00905: missing keyword

Cause: You tried to execute a statement, but you missed a required keyword.

Action: Try fixing the statement and re-executing. If you need to check out the proper syntax for your SQL statement, you can view the following pages:

Some other useful pages are:

29 questions
161
votes
4 answers

SELECT INTO using Oracle

I'm trying to do a SELECT INTO using Oracle. My query is: SELECT * INTO new_table FROM old_table; But I get the following error: SQL Error: ORA-00905: missing keyword 00905. 00000 - "missing keyword" Any ideas what's wrong? The Standard behavior…
Robert Gould
  • 68,773
  • 61
  • 187
  • 272
26
votes
6 answers

Oracle error : ORA-00905: Missing keyword

Excuting the line of SQL: SELECT * INTO assignment_20081120 FROM assignment ; against a database in oracle to back up a table called assignment gives me the following ORACLE error: ORA-00905: Missing keyword
test
13
votes
2 answers

SQL Oracle LEFT JOIN and SUBQUERY error: ORA-00905: missing keyword

Asking for your help on this Oracle query. It's giving me the error 2 "ORA-00905: missing keyword". It was working fine before I added the LEFT JOIN statement. Obviously it won't deliver the information as we need it without the LEFT JOIN…
Arturo
  • 1,123
  • 3
  • 19
  • 33
3
votes
1 answer

ORA-00905: missing keyword

I am getting ORA-00905: missing keyword error when trying to run the following query in Oracle: select distinct MONTH_ID from DSS_MAIN.DIM_TIME a1 where Case When TO_CHAR(SYSDATE,'MM') < 3 Then TO_CHAR(a1.MONTH_START_DATE,'YYYYMM') Between…
EvanMPW
  • 351
  • 1
  • 6
  • 15
2
votes
1 answer

how to find length of a Long Column in a table

I have a LONG column named FileSize in a table called Files. To achieve the objective, I did the following : I wrote this PL/SQL script to find the size declare long_var LONG:=0; begin dbms_output.put_line(length(long_var)); execute immediate…
Egalitarian
  • 2,168
  • 7
  • 24
  • 33
2
votes
3 answers

Getting ORA-00905 error when trying to add a foreign key

I'm trying to perform the following statement into oracle: alter table COMENTARIO add constraint FK_COMENTARIO_DI foreign key (DI_ID) references DATO_DE_INTERES (DI_ID) ON UPDATE CASCADE ON DELETE SET NULL; However, I get ORA-00905 missing…
Carlos
  • 21
  • 2
2
votes
1 answer

Using the Oracle "at time zone" function in sql - problem and solution

I have a table with a date column that I know is stored in GMT. I have a procedure that accepts a date input and an account ID. The procedure: 1) gets the account ID timezone (stored in table account) 2) determines the start and end range in GMT…
Thomas Gnade
  • 43
  • 1
  • 2
  • 4
2
votes
3 answers

Missing Keyword in JOIN syntax

I have searched the site before asking the question but havn't come across something related. I am sure this is a ridiculously basic error, i have only been studying Oracle SQL from 0 computer background for around 4 months. I am planning to take…
Rami Aboulissane
  • 23
  • 1
  • 1
  • 4
2
votes
1 answer

Missing Keyword (ORA-00905) - Oracle SQL Case Statement

Good morning, I was wondering if one of you could help me - should be fairly quick I'd imagine; I'm a newbie so prone to missing obvious things. I have the below statement which is returning the aforementioned 905 error...any ideas? Thanks in…
HendrixAndChill
  • 91
  • 1
  • 2
  • 9
1
vote
1 answer

Multiple Insert statement failing ORA-00905: missing keyword error

I am using the below SQL script to insert few records into a new table that I created using create statement. But I am getting the following error ORA-00905: missing keyword Below is the script which is quite straightforward. I guess I am missing…
somnathchakrabarti
  • 3,026
  • 10
  • 69
  • 92
1
vote
2 answers

How to fix ORA-00905 missing keyword with case expression

I have problem with case in the line I marked it below. I need it to be shown like debits | credits | total debits | total credits The SQL query is: SELECT cv_amount, case when cv_amount > 0 then cv_amount else 0 end as debits, case…
ali zaidi
  • 13
  • 2
1
vote
1 answer

ORA-00905: missing keyword Hibernate Query Oracle

I have n columns in a table. I want to have selection criteria as if a value in column2 is null then select row based on column 1 and if column2 is not null then select based on the value of column 2. I have a long query which is working fine before…
user123475
  • 1,065
  • 4
  • 17
  • 29
1
vote
3 answers

Oracle: CASE conditional STATEMENT in the WHERE Clause is not working?

I have below query with CASE statement and this is trowing "missing keyword error" Can you please help. select * from podConfigKey_Tab PCK WHERE CASE WHEN (PCK.Keyid = 'TLMAPIConfigMgr.UseDB' and PCK.DEFAULTKEYIDVALUE =…
Rita
  • 1,237
  • 5
  • 24
  • 46
0
votes
1 answer

Oracle parameterize finding column count of a table - ORA-00905: missing keyword

I am adding a number of columns to multiple tables. Before I add them, I want to make sure they don't exist already. SELECT count(*) INTO myCount FROM user_tab_cols WHERE column_name = 'newCol' and table_name = 'tableName'; Since the only…
Arun Gowda
  • 2,721
  • 5
  • 29
  • 50
0
votes
1 answer

Error found in logs - ORA-00905: Missing Keyword i

I'm facing an error ORA-00905: Missing Keyword Any advice how to fix it? Error came up when I recover DB. It failing in that query: CREATE TABLE "WIA"."raskw" ( "sourceline" VARCHAR2 (1000 BYTE), "errmsg" VARCHAR2 (1000…
Nevis
  • 21
  • 4
1
2