Unix Technical Forum

setting the termination character in CLP

This is a discussion on setting the termination character in CLP within the DB2 forums, part of the Database Server Software category; --> Hi, In CLP I want to change the statement termination character from default to ;(semi colon). I tried update ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 02:04 PM
Baski
 
Posts: n/a
Default setting the termination character in CLP

Hi,

In CLP I want to change the statement termination character from
default to ;(semi colon). I
tried update command options- but didn't work. how to do it????

regards,
Baski.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 02:04 PM
Baski
 
Posts: n/a
Default Re: setting the termination character in CLP

On Aug 10, 4:02 pm, Baski <mailtoba...@gmail.com> wrote:
> Hi,
>
> In CLP I want to change the statement termination character from
> default to ;(semi colon). I
> tried update command options- but didn't work. how to do it????
>
> regards,
> Baski.


I found the answer, it is db2 -t. Thanks.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 02:04 PM
Serge Rielau
 
Posts: n/a
Default Re: setting the termination character in CLP

Baski wrote:
> On Aug 10, 4:02 pm, Baski <mailtoba...@gmail.com> wrote:
>> Hi,
>>
>> In CLP I want to change the statement termination character from
>> default to ;(semi colon). I
>> tried update command options- but didn't work. how to do it????
>>
>> regards,
>> Baski.

>
> I found the answer, it is db2 -t. Thanks.
>

If you need to change the option from within the CLP, e.g. to create
triggers or procedures use:
--#SET TERMINATOR <character>
e.g.
CREATE TABLE t(c1 int);

--#SET TERMINATOR %
CREATE TRIGGER trg BEFORE INSERT ON t
FOR EACH ROW
BEGIN ATOMIC
VALUES 1;
END
%
--SET TERMINATOR ;

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com