473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Sequence as column name in DB2 V8 on MVS

I am running my application on Windows.
Developed in C++.

The DB2 V8 database is installed on MVS mainframes.
DB2 Client is installed on Windows.

Currently i am getting error as follows :
**************************************************
***************************
Insert into SANS.log(sequence,subsequence,recordTypt,logDate,n
ame,action) values
(:sequene, :subsequence, :recordType, :logDate, :name, :action)

Class: DBMS
Native Error Code: -199

[IBM][CLI Driver][DB2]SQL0199N The use of the reserved word "SEQUENCE"
following "" is not valid. Expected Tokens may include "( SELECT"/
SQLSTATE=42601
**************************************************
***************************

please update me regarding this issue....

thanks.

Sep 27 '07 #1
5 3289
Please show your DDL for SANS.log.
I guess that you did some misuse of GENERATE or SEQUENCE syntax.

Sep 27 '07 #2
On Sep 27, 4:15 pm, Tonkuma <tonk...@fiberbit.netwrote:
Please show your DDL for SANS.log.
I guess that you did some misuse of GENERATE or SEQUENCE syntax.
CREATE TABLE SANS.LOG (
Sequence DECIMAL(9 ,0) NOT NULL ,
SubSequence DECIMAL(9 ,0) NOT NULL ,
RecordType DECIMAL(9 ,0) ,
LogDate TIMESTAMP ,
Name char (30) ,
Action char (80) ,
usertype DECIMAL(1) ,
sourceapp DECIMAL(1)
)

Sep 27 '07 #3
Santy wrote:
CREATE TABLE SANS.LOG (
Sequence DECIMAL(9 ,0) NOT NULL ,
SubSequence DECIMAL(9 ,0) NOT NULL ,
RecordType DECIMAL(9 ,0) ,
LogDate TIMESTAMP ,
Name char (30) ,
Action char (80) ,
usertype DECIMAL(1) ,
sourceapp DECIMAL(1)
)
If it hurts don't do it...
You have 2 choices:
* Use another column name
* double quote the column rereference: "SEQUENCE" (remember to uppercase)

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Sep 27 '07 #4
what is the db2level you are using

swami.

Sep 30 '07 #5
swami wrote:
what is the db2level you are using
That's a DB2 z/OS V8 issue. It is working fine as originally written in DB2
z/OS V9. DB2 LUW did not behave like that in the recent versions.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Oct 2 '07 #6

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

Similar topics

5
by: Ken1 | last post by:
I am going to drop a primary key from one column and create a new column to be used as primary key in an existing database. The old column was a date column which someone earlier though was a good...
1
by: Axier | last post by:
Hi, I wonder how this can happen. A "not null" field is set to "" even if a sequence should set this to next sequence number. Ok, I know it is not set to null, it is set to '' which is proven...
4
by: UDBDBA | last post by:
Hi: we have column with GENERATED ALWAYS AS DEFAULT. So, we can insert into this column manually and also let db2 generate a value for this column. Given a scenario, how can i find the NEXTVAL...
0
by: Axier | last post by:
Hi, I wonder how this can happen. A "not null" field is set to "" even if a sequence should set this to next sequence number. Ok, I know it is not set to null, it is set to '' which is proven...
1
by: ben f | last post by:
So I am renaming a table, and the last stumbling block that I've met is the associated sequence. I tried the commands suggested @ ...
4
by: Sim Zacks | last post by:
I am in the process of converting an existing database to PostGreSQL and wrote a generic script to update all of the sequences as they default at 1. I thought it would be useful to other people who...
15
by: Robby Russell | last post by:
I am trying to track down a method of determining what a sequence name is for a SERIAL is in postgresql. For example, CREATE TABLE foo (id SERIAL PRIMARY KEY NOT NULL, bar TEXT); \d foo...
6
by: newtophp2000 | last post by:
Hello, Since SQL Server has no sequence generator, I wrote my own. (I claim no ownership of it as it is closely modeled after earlier discussions on this topic.) I have included the sql...
0
by: wmos4995 | last post by:
Hi, I am writing a procedure to alter the value of a sequence to max value of the table column. This is what i have written till now. CREATE PROCEDURE RESET_SEQ ( IN TABNAME VARCHAR(50),...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.