Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

missing expresion

Posted on 1999-10-15
2
Medium Priority
?
846 Views
Last Modified: 2008-02-20
what is wrong with this statement
the fields of the table are:
pin_no varchar2(12)
amount number(10,3)
payment_type varchar2(20)
payment_date date
index_no varchar2(12)
c_card_no varchar2(20)
check_no number(20)
accou_no number(15)
exp_date date
bank varchar2(20)
operator varchar2(20)
code varchar2(20)

------------------------------------------------------------
insert into customer_credit values('WEB00001', 10,'PrePaid CC', to_date('10/15/1999 09:03:00','mm/dd/yyyy hh24:mi:ss'),'','4111111111111111',,,to_date('01/10/1999','mm/dd/yyyy'),'','self','Cyber')
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC driver for Oracle][Oracle]ORA-00936: missing expression

/michaelmarom-23/mck-cgi/directpaycredit.asp, line 73
0
Comment
Question by:Info_user100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
meowsh earned 40 total points
ID: 2129730
try this

insert into XYZ
values
('WEB00001'
, 10
,'PrePaid CC'
, to_date('10/15/1999 09:03:00'
,'mm/dd/yyyy hh24:mi:ss')
,NULL
,'4111111111111111'
,NULL
,NULL
,to_date('01/10/1999','mm/dd/yyyy')
,NULL
,'self'
,'Cyber')
/


I always try to code NULL when I dont want to insert into a field as opposed to using ,, or ,''.

It also good practice to list the field names you are inserting into.

e.g.

Insert into <table>
(<col1>,<col2>,<col3>)
values
(<val1>,<val2>,<val3>)

then if the table changes the insert statement will still run....in your current way if you add another field to the table the insert statement will fail.

Meowsh
0
 

Author Comment

by:Info_user100
ID: 2129858
Meowsh you were right the absence of NULL was throwing me off.      

Thanks
Max.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question