Merlin
Merlin

Reputation: 1

Insert Query Error (Invalid Character)

This query

insert into table-name(CONTRACT_TYPE,CATEGORY) ( 
select 'GOLDCHOICE','C-CLASS' 
from tablename2 
where model_no = '1'and part_number not in (
  select part_number from tablename3 
  where contract_type ='GOLDCHOICE' 
  and category = 'C-CLASS' 
  and model_number = '1')
);  

is running successfully in Oracle(TOAD).

However, when I run it from asp.net (connected to oracle), it is throwing

ORA-00911: invalid character

But without 'semicolon(;)' it's running fine.

What could be causing this?

Upvotes: 0

Views: 1654

Answers (1)

evgenyl
evgenyl

Reputation: 8107

Try to remove ; from the end of your query. Some providers - like ODP - don't like the ; in the end of query.

Upvotes: 1

Related Questions