473,560 Members | 2,853 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL0104N on insert of consecutive NULLs

I have a developer getting a SQL0104N on an insert statement. He is
inserting a list of values into a table and instead of putting 'NULL' into
the statement, the program just puts a placeholder comma. He is getting
the following error:

SQL ERROR ->[IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token ",,"
was found following "000000,0.00000 0,0,0,". Expected tokens may include:
"<rvc_element>" . SQLSTATE=42601

The two commas in the unexpected token field are supposed to be inserted as
NULL into NULLable columns.

I do not recall ever seeing this error raised for this condition before.
We are runing DB2 V7.2 fixpack 4 on Intel under Windows 2K.

--
Message posted via http://www.dbmonster.com
Nov 12 '05 #1
2 5743
You have to include NULL if the column should be nulled, or if you have for
instance a table with 3 columns do an insert into tablex(col1,col 2) values
(val1,val2) to leave col3 null.

--
Message posted via http://www.dbmonster.com
Nov 12 '05 #2
Mark McNary via DBMonster.com wrote:
I have a developer getting a SQL0104N on an insert statement. He is
inserting a list of values into a table and instead of putting 'NULL' into
the statement, the program just puts a placeholder comma. He is getting
the following error:

SQL ERROR ->[IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token ",,"
was found following "000000,0.00000 0,0,0,". Expected tokens may include:
"<rvc_element>" . SQLSTATE=42601

The two commas in the unexpected token field are supposed to be inserted
as NULL into NULLable columns.


This is just a plain syntax error. DB2 doesn't know that you really meant
what you wrote and it also doesn't know the exact semantics that you want
to have applied. Have a look here for the syntax supported by INSERT:
http://publib.boulder.ibm.com/infoce...n/r0000970.htm

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3912
by: collincm | last post by:
Hi, I am trying to optimize a table for inserts. Half of the timeron cost is in the FK lookup! These tables for example CREATE TABLE FOO2( FOO2_ID INTEGER NOT NULL CONSTRAINT FOO2_PK PRIMARY KEY, DATA VARCHAR(200) NOT NULL, LASTTIME TIMESTAMP NOT NULL);
4
2266
by: chambersdon | last post by:
I have an application that needs to insert nulls into the database and I don't seem to be able to do this. I am currently trying to do this with a Typed DataSet but I can't seem to Insert Nulls (or udpate columns with a null value). I have a column in a test table called 'anInteger'. The Typed DataSet for this element has minOccurs="0" and...
5
4060
by: robecflo | last post by:
Hi Forum, i have a problem, hope somebody can give me ideas. I'm developing with windows forms and vb.net, and oracle as a database. At this moment i have a table called amortizaciones, this table has a field called id_pasivo, which is foreign key to another table called pasivo, a consecutive field called no_cupon and a third field called...
3
3711
by: teddysnips | last post by:
I need a trigger (well, I don't *need* one, but it would be optimal!) but I can't get it to work because it references ntext fields. Is there any alternative? I could write it in laborious code in the application, but I'd rather not! DDL for table and trigger below. TIA
11
28307
by: Ted | last post by:
OK, I tried this: USE Alert_db; BULK INSERT funds FROM 'C:\\data\\myData.dat' WITH (FIELDTERMINATOR='\t', KEEPNULLS, ROWTERMINATOR='\r\n');
0
3756
by: varac | last post by:
Hi list, I am new to mysql and would appreciate any advice that you have to offer. I am attempting to batch insert 100 rows into a table, and I need to know the 100 id's of all the inserted rows. I know that I can find the id of the last inserted row despite my app being multi-threaded, since the select last inserted command is...
4
4382
by: Justin | last post by:
Excuted the statement through a SSH connection: db2 import from <filename.ixfof ixf messages /database/stage/ acct_news_asc.txt insert into userid.acct_news_asc And it worked fine. Ran the same command through perl and received an error: SQLErr: SQL0104N An unexpected token "/database/stage/acct_news_asc.txt" was found following
1
2531
by: kfwolf | last post by:
Excuted the statement through a SSH connection: db2 load from <filename.ixf> of ixf messages /database/stage/ acct_news_asc.txt insert into userid.acct_news_asc And it worked fine. Ran the same command through perl and received an error:
1
7251
by: Justin | last post by:
We had a load that failed. Now we have a pending load. When executing load terminate, we receive the following error: db2 load terminate SQL0104N An unexpected token "terminate" was found following "LOAD". Expected tokens may include: "QUERY". SQLSTATE=42601 db2 query load terminate DB21034E The command was processed as an SQL...
0
7840
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8063
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7595
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7916
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5175
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3605
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1168
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
874
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.