Normally I use the semicolon for statement delimiters in plain SQL
scripts (for DDL, simple DML etc.).
But inside SQL/PL I tend to use % or @ as statement delimiters. But
other people prefer other delimiters.
I know that I can use the CLP option "-td" to specify the delimiter on
the command line, when invoking the script. But this requires me to
look inside the scripts to find the delimiter before I run the script.
It would be nice for the script itself to be able to declare its own
delimiter inside itself, thereby allowing calling scripts to not-care
about which delimiter(s) are used inside of any particular script, and
if the script did not make any such declaration then some default (like
semicolon etc) would apply. Something like "SET STATEMENT_DELIM ITER %".
Someone told me there was something for this in new versions of DB2,
but I cannot find it yet. 9 13743 _l*****@yahoo.c om wrote: Normally I use the semicolon for statement delimiters in plain SQL scripts (for DDL, simple DML etc.).
But inside SQL/PL I tend to use % or @ as statement delimiters. But other people prefer other delimiters.
I know that I can use the CLP option "-td" to specify the delimiter on the command line, when invoking the script. But this requires me to look inside the scripts to find the delimiter before I run the script.
It would be nice for the script itself to be able to declare its own delimiter inside itself, thereby allowing calling scripts to not-care about which delimiter(s) are used inside of any particular script, and if the script did not make any such declaration then some default (like semicolon etc) would apply. Something like "SET STATEMENT_DELIM ITER %".
In the DB2 doc I just find this:
Statement Termination Character Option (-t):
The -t option tells the command line processor to use a semicolon (;) as
the statement termination character, and disables the backslash (\) line
continuation character.
Note:
This option *cannot* be changed from within the interactive mode. http://publib.boulder.ibm.com/infoce...e/r0010410.htm
--
Knut Stolze
Information Integration Development
IBM Germany / University of Jena
Knut, It seems you answered a different question than the one that I
asked.
The -t option is not settable *inside* a script (via "update command
options"), according to the docs
..
I'm asking if a script can specify its delimiter inside the file,
rather than via the command-line. I know I can parse the file to find
the delimiter, but it seems a kludge.
db2 => --#SET TERMINATOR %
db2 => values 1%
1
-----------
1
1 record(s) selected.
db2 => --#SET TERMINATOR ;
db2 => values 1;
1
-----------
1
1 record(s) selected.
db2 =>
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Magic.
Thanks Serge.
Now that I see the syntax, this info has made it into the online
infocentre under "Documentat ion updates".
Since fp1 of v8.1. Message to self: ingest that section as carefully as
the release notes.
In article <11************ **********@o13g 2000cwo.googleg roups.com>,
(_l*****@yahoo. com) says... Magic.
Thanks Serge.
Now that I see the syntax, this info has made it into the online infocentre under "Documentat ion updates".
Since fp1 of v8.1. Message to self: ingest that section as carefully as the release notes.
I only could find it in the Db2 z/OS docs, not in the DB2
Unix/Windows docs. Did I miss it?
Gert van der Kooij wrote: In article <11************ **********@o13g 2000cwo.googleg roups.com>, (_l*****@yahoo. com) says...
Magic.
Thanks Serge.
Now that I see the syntax, this info has made it into the online infocentre under "Documentat ion updates".
Since fp1 of v8.1. Message to self: ingest that section as carefully as the release notes.
I only could find it in the Db2 z/OS docs, not in the DB2 Unix/Windows docs. Did I miss it?
New in FP8 you need to go to the online docs @boulder
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
In article <3n************ *@individual.ne t>, Serge Rielau
(sr*****@ca.ibm .com) says... Gert van der Kooij wrote: In article <11************ **********@o13g 2000cwo.googleg roups.com>, (_l*****@yahoo. com) says...
Magic.
Thanks Serge.
Now that I see the syntax, this info has made it into the online infocentre under "Documentat ion updates".
Since fp1 of v8.1. Message to self: ingest that section as carefully as the release notes.
I only could find it in the Db2 z/OS docs, not in the DB2 Unix/Windows docs. Did I miss it? New in FP8 you need to go to the online docs @boulder
Cheers Serge
Could not find it there either, can you post a (tiny) url?
In article <MP************ ************@ne ws.xs4all.nl>, Gert van der
Kooij (ge**@invalid.n l) says... New in FP8 you need to go to the online docs @boulder
Cheers Serge
Could not find it there either, can you post a (tiny) url?
Sorry, found it allready.
Gert van der Kooij wrote: In article <MP************ ************@ne ws.xs4all.nl>, Gert van der Kooij (ge**@invalid.n l) says...
New in FP8 you need to go to the online docs @boulder
Cheers Serge
Could not find it there either, can you post a (tiny) url?
Sorry, found it allready.
well, now that I had to learn how to make tiny URLs you get it anyway: http://tinyurl.com/ba4po
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andrey Tatarinov |
last post by:
Hi.
It would be great to be able to reverse usage/definition parts in
haskell-way with "where" keyword. Since Python 3 would miss lambda, that
would be extremly useful for creating readable sources.
Usage could be something like:
>>> res = where:
>>> def f(x):
|
by: pohmart |
last post by:
I am using Xerces 2.6.2 and SAX on Windows2k. I want to validate an XML
doc, which has no schema reference,
with an external schema which is on my PC.
I am setting the following properties and features:
saxParser.setFeature("http://xml.org/sax/features/namespaces", true);
saxParser.setFeature("http://xml.org/sax/features/namespace-prefixes",
true);
saxParser.setFeature("http://xml.org/sax/features/validation", true);...
|
by: hype |
last post by:
Hi,
1) If I need to monitor a resource eg, bufferpools at the database
level across all users, how can I do this ?
If snapshot monitoring needs to be done wouldn't enabling the switch
at the DBM level cause performance problems ?
2)How does one find the SQL statement that a particular user session
is executing?
TIA,
|
by: Siv |
last post by:
Hi,
I just discovered that if in an ADO.NET query I use:
"Select * from Invoices Where InvoiceDate BETWEEN StartDate AND EndDate;"
In this case StartDate would be 1st of month and EndDate would be the last
day of the month, e.g. 31/08/2005 (UK DD/MM/YYYY format)
I find that the query is missing off any invoices that were done on the 31st
of the Month, in other words if in the between statement I don't specify a
time, ADO.NET or Jet...
|
by: Scottie_do |
last post by:
I'm considering switching to C# and using VS2005, but I'd like to know if I
can have a list of values at runtime and then specify (at runtime) what it's
value type is.
For example, I would have this in my Multi-Dimensional Array named people
Then, I would then like to say:
new Person<People.ToString>();
Where ToString() would output a built in datatype or a struct/object that I
| |
by: shorti |
last post by:
Can you not use the 'FOR READ ONLY' option with the cursor declare
unless you put the SELECT statement in the declare?
re:
EXEC SQL
DECLARE c2 CURSOR FOR s2 FOR READ ONLY;
errors with:
|
by: Antonio |
last post by:
Can somebody tell my why the following procedure changes the data in the
fields being updated to all the records in the database?
private void updateRow(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
SqlConnection conn = new SqlConnection
(ConfigurationSettings.AppSettings);
SqlCommand updCommand = new SqlCommand();
|
by: noor.rahman |
last post by:
I was wondering how it may be possible to query 2 MySQL databases using
one query statement from PHP.
For instance: SELECT database1.tableA.field1 UNION
database2.tableB.field2.
My concern is, when connecting to MySQL (or sending a query), I only
specify 1 database connection resource ID. How does that play out when
connecting to 2 databases?
|
by: kwatch |
last post by:
What is the condition of module name which is available in
'from .. import ..' statement ?
----------------------------------------
import os
print os.path # <module 'posixpath' from '/usr/local/
lib/python2.5/posixpath.pyc'>
from posixpath import sep # (no errors)
from os.path import sep # (no errors, wow!)
path = os.path
|
by: dspfun |
last post by:
Hi!
The words "expression" and "statement" are often used in C99 and C-
textbooks, however, I am not sure of the clear defintion of these
words with respect to C.
Can somebody provide a sharp defintion of "expression" and
"statement"? What is the difference between an expression and a
statement?
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |