Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2008

Tip: Looking for answers? Try searching our database.

Why DB2 developers could not make it possible to change statement     termination character dynamically?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bespridannik@gmail.com - 27 Feb 2008 23:03 GMT
All the time I'm working with DB2 I feel that DB2 authers just hate
their customers and users of their products...

The last example - I want to create a stored procedure in the script,
use it to add data to database inside this script and then drop this
procedure. And I want this script be able to run as a script and also
just copied to Command Editor.

But it is impossible!

You just cannot change statement termination char by something like
UPDATE COMMAND OPTIONS -t @! Statement termination char can be defined
only before the whole script execution - either in db2 -td @ or in
spetial options of the editor you are using. What a hell...

I hope I'm wrong. Does anybody know how to solve it?
Serge Rielau - 28 Feb 2008 00:15 GMT
> You just cannot change statement termination char by something like
> UPDATE COMMAND OPTIONS -t @! Statement termination char can be defined
> only before the whole script execution - either in db2 -td @ or in
> spetial options of the editor you are using. What a hell...
>
> I hope I'm wrong. Does anybody know how to solve it?
--#SET TERMINATOR @

I will contact the ID folks....

Cheers
Serge
Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Serge Rielau - 28 Feb 2008 01:50 GMT
>> You just cannot change statement termination char by something like
>> UPDATE COMMAND OPTIONS -t @! Statement termination char can be defined
[quoted text clipped - 3 lines]
>> I hope I'm wrong. Does anybody know how to solve it?
> --#SET TERMINATOR @
http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.d
oc/doc/r0010410.htm


Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Bespridannik - 28 Feb 2008 11:59 GMT
> > bespridan...@gmail.com wrote:
> >> You just cannot change statement termination char by something like
[quoted text clipped - 6 lines]
>
> http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2....

Thank you for help!

And it works in DB2 CLP also as in Command Editor!

Example:

Next commands can be executed in DB2 CLP also as in Command Editor:

--#SET TERMINATOR ;
select count(*) from user;
select count(*) from user;
--#SET TERMINATOR %
select count(*) from user%
select count(*) from user%
--#SET TERMINATOR ;
select count(*) from user;
select count(*) from user;

> --
> Serge Rielau
> DB2 Solutions Development
> IBM Toronto Lab
Serge Rielau - 28 Feb 2008 13:15 GMT
>>> bespridan...@gmail.com wrote:
>>>> You just cannot change statement termination char by something like
[quoted text clipped - 5 lines]
>> http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2....
> And it works in DB2 CLP also as in Command Editor!
I admit I wasn't sure about the command editor ;-)

Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.