DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 14th, 2006, 11:44 PM
sumanthvm sumanthvm is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 8 sumanthvm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 17 m 55 sec
Reputation Power: 0
Arrow Creating triggers

TABLE DETAILS:
Table name:-DUMMY1
details:student_no INTEGER,college varchar(20),age smallint

TRIGGER STATEMENT:

create trigger trigger_dummy1 after insert on dummy1 for each row mode db2sql update set student_no = student_no +1

ERROR DISPLAYED:

------------------------------ Commands Entered ------------------------------
connect to sampl;
create trigger trigger_dummy1 after insert on dummy1 for each row mode db2sql update set student_no = student_no +1;
------------------------------------------------------------------------------
connect to sampl

Database Connection Information

Database server = DB2/NT 8.2.3
SQL authorization ID = ADMINIST...
Local database alias = SAMPL


create trigger trigger_dummy1 after insert on dummy1 for each row mode db2sql update set student_no = student_no +1
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "student_no" was found following "de db2sql
update set". Expected tokens may include: "SET". LINE NUMBER=1.
SQLSTATE=42601

SQL0104N An unexpected token "student_no" was found following "de db2sql update set". Expected tokens may include: "SET ".

Explanation:

A syntax error in the SQL statement or the input command string
for the SYSPROC.ADMIN_CMD procedure was detected at the specified
token following the text "<text>". The "<text>" field indicates
the 20 characters of the SQL statement or the input command
string for the SYSPROC.ADMIN_CMD procedure that preceded the
token that is not valid.

As an aid, a partial list of valid tokens is provided in the
SQLERRM field of the SQLCA as "<token-list>". This list assumes
the statement is correct to that point.

The statement cannot be processed.

User Response:

Examine and correct the statement in the area of the specified
token.

sqlcode : -104

sqlstate : 42601

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > Creating triggers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway