473,382 Members | 1,238 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,382 software developers and data experts.

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

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?
Feb 27 '08 #1
4 1527
be**********@gmail.com wrote:
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
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 28 '08 #2
Serge Rielau wrote:
be**********@gmail.com wrote:
>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 @
http://publib.boulder.ibm.com/infoce...c/r0010410.htm
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 28 '08 #3
On Feb 28, 2:50*am, Serge Rielau <srie...@ca.ibm.comwrote:
Serge Rielau wrote:
bespridan...@gmail.com wrote:
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 @

http://publib.boulder.ibm.com/infoce...ic/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
Feb 28 '08 #4
Bespridannik wrote:
On Feb 28, 2:50 am, Serge Rielau <srie...@ca.ibm.comwrote:
>Serge Rielau wrote:
>>bespridan...@gmail.com wrote:
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 @
http://publib.boulder.ibm.com/infoce...ic/com.ibm.db2....
And it works in DB2 CLP also as in Command Editor!
I admit I wasn't sure about the command editor ;-)

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 28 '08 #5

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

Similar topics

5
by: larry | last post by:
Hi. Our company has about 20 application developers/architects and one certified dba. Our developers both design the databases and build the applications. We're confused about what permissions a...
22
by: Robert Brown | last post by:
suppose I have the following table: CREATE TABLE (int level, color varchar, length int, width int, height int) It has the following rows 1, "RED", 8, 10, 12 2, NULL, NULL, NULL, 20...
2
by: Pete Kipe | last post by:
I'm not a JavaScript programmer...but I'm trying to put together a simple menu system for a new website and need a little help. I have the following script: <SCRIPT language=javascript> <!--...
132
by: Kevin | last post by:
I don't know if I should even start this topic but here goes. I'm an ex vb6 developer, now developing in C#. The reason why I started developing in C# is because the company that I worked for at...
8
by: dbaplusplus | last post by:
I worked on web development using java script many many years, so I am now a newbie to javascript. I have a single html page, which is generated dynamically using some programming language. Web...
23
by: JohnH | last post by:
I'm just recently come to work for an auto brokerage firm. My position involves performing mysterious rites, rituals and magick in order to get information out of their access database. This is...
11
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I know I sound like a one-note Johnny on this but I'm still looking for a solution. I need to display characters coming in from a serial port or a socket. I also need to be able to type...
30
ADezii
by: ADezii | last post by:
This week’s Tip of the Week will clearly demonstrate how you can dynamically set the Drop Down List Width of a Combo Box to the length of the longest item in its Row Source. The inspiration for this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.