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:...

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...

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...

Oracle copy data to another table

In the Oracle, I copy data from a backup to a new table, it doesn't work. what is the correct syntax ? Thanks select CODE, MESSAGE into EXCEPTION_CODES (CODE, MESSAGE) from...

Error in Oracle procedure, object is invalid

Where is the bug? Compilation ends with errors and I have no idea where I'm going wrong. create or replace PROCEDURE make_payoff(user_id_argument number) is begin payoff_amount:= 0; CURSOR Clicks...

Changing the data type "varchar'' of a column to "DATE" in SQL/ORACLE

I have a table in a database created in oracle 10G. It contains a column of type 'VARCHAR' and stores date as string in this format-> 'dd-mon-yyyy' eg: '12-aug-2008'. Now I want to change the...

Select into a temporary table in Oracle

I am trying to do something like the following, select * into temp from (select * from student); It gives me the following error, ERROR at line 1: ORA-00905: missing keyword In my real example...

ORA-00905: missing keyword - Alter table modify column not working in Oracle 10g

I regularly take caution when creating tables for database. This time I came across a situation to alter a table. I wanted to change the Data Type of a field/column in Table. To change the data...

SQL join with distinct column on one table

Maybe I'm searching using the wrong words because I can't find the answer elswhere, but I need to join two tables but make sure the ID from one of the tables is distinct. Something like the...

Unable to put a WITH FUNCTION clause in a BEGIN/END block

Why doesn't the below code compile: DECLARE c number; BEGIN WITH FUNCTION calculate(i IN NUMBER) RETURN NUMBER AS r number; BEGIN r := i*i; RETURN r; END; select calculate(1) INTO c from...

PLSQL insert and returning id form trigger on table

I am trying to execute insert statement within PLSQL insert and returning out the id generated from trigger on table that use sequences but I am getting below error dose anyone has any idea about...

How to change column data type to DOUBLE in SQL?

I want to change the data type of an existing column of a particular table using below statement: ALTER TABLE tablename MODIFY columnname DOUBLE; but it throws following error, SQL Error:...

Is Oracle MERGE NOT MATCHED THEN UPDATE possible?

We'd like to set the IS_DEL bit = 1 when a record exists in a Target table that doesn't exist in the Source table. Is it possible to use a MERGE statement using the WHEN NOT MATCHED clause, but...

beginner sql missing keyword and invalid identifier

CREATE table Book ( book_title varchar (100) not null , book_genre char(60) not null, Date_of_publish date not null, user_code char(7) not null , book_id char (7) primary key not null ,...

node.js / oracledb driver limitations

Node.js ver: 9.2 Oracledb driver ver: 2.0.15 I have written an anonymous PL/Sql procedure with declaration, execution and exception sections of 200 lines of coding. This runs perfectly fine when...

Adding composite primary and foreign keys to three columns in one table

QUESTION: Create a table named REP_CONTRACTS containing the columns listed in the following chart. A composite PRIMARY KEY constraint including the REP_ID, STORE_ID, and QUARTER columns should be...

FOR XML PATH is giving an error ORA-00905: missing keyword

The following sql query doesn't run as expected(generating an XML output) in oracle apex :- SELECT CA_ID as "Address/CA_ID", ADDRESS_TYPE_ID as "Address/ADDRESS_TYPE_ID", ADDRESS_TYPE_CODE...

Encoding in dplyr Sql Queries

I'm having problems with encoding in a dplyr generated Sql-Query. I can query the database (Oracle, connected to with odbc) and it returns Norwegian special characters æøå, but I can't use...

Create a materialized view using a procedure

I trying to create a materialized view using a procedure, but I did something wrong. I need this because I will schedulle the job on the server. Example... My script is: create or replace...

Unable to Correct Oracle Error ORA-00905 Missing Keyword in SQL

I've been grinding on this small snippet of simple code for a day and can't find the issue causing the error. As the title states, I am getting error ORA-00905 Missing Keyword when trying to...

Create temporary table in Oracle

I'm trying to create temporary table in PL/SQL developer and insert some data, but it throws error: ORA-00905 My code: CREATE PRIVATE TEMPORARY TABLE my_temp_table ( id NUMBER, ...

Date comparison in Oracle where case when giving error

[Error] ORA-00905 (21577: 32): PL/SQL: ORA-00905: missing keyword at to_date(last_update_date) >= to_date(concat('01-OCT-',p_year-1)) SELECT SUM(trans_value) total, bectrn_id, becat_id FROM...

How to use JPA or JDBC to call specific PL/SQL function using REF CURSOR

My problem is that I want to call PL/SQL function in @PostConstruct method in Spring Boot. This function returns information about tables in a database as you can see above: CREATE OR REPLACE...

pl/sql Cursor error ORA-06550 ORA-00905 Cursor will not compile because of a missing keyword. I don't really know which keyword I am missing

I'm trying to write a simple cursor that will display all sales from SALES table in a form (seller surname) sold a product to (customer surname) Here's my...

Execute PROCEDURE on Oracle PL/SQL with DECLARE variable

I just currently learning about Oracle PL/SQL. I wanna create store procedure with variable and then call it with another script. Is it possible? I tried use simple script without variable and it...

Oracle apex ORA-00905 and ORA-06512

I have the following SQL statement generated by MySQL Workbench. When I run it on Oracle Apex i get these errors. Can someone help identify the problem? ORA-00905: missing keyword ORA-06512: at...

Use string concatenation in UPDATEXML()

I want to write an update script for my oracle db. I want to replace old XML node values with new ones. But I need to do this for many values so I wanna outsource the logic in a procedure. This is...

How can I solve PL/SQL: Statement ignored error?

I'm trying to write a procedure. The procedure will be queried with the school number and the course_name, midterm_not, final_not, the average will be revealed, but the midterm and final grades...

ORA-06550 Procedure created with compilation errors

Create a function named 'find_company' which accepts a character and displays company name starts with the given character input using cursors. Hints: Procedure name: find_company Input parameter...

Insert Data Into Table with Stored Procedure in Oracle SQL

I am working through a homework assignment and am stuck on a problem with stored procedures. I have the following tables: create table Restaurant(rID int, name varchar2(100), address...