From: Serge Rielau on
Dave Hughes wrote:
> Serge Rielau wrote:
>
>> Working as documented:
>> http://publib.boulder.ibm.com/infocenter/db2luw/v8//topic/com.ibm.db2.
>> udb.doc/admin/r0000888.htm
>>
>> DEFAULT ...
>>
> [snip]
>
> But why can CURRENT CLIENT_APPLNAME and CURRENT CLIENT_WRKSTNNAME not
> be used as column defaults? I'm guessing there must be some technical
> reason, e.g. maybe there are some circumstances in which these
> registers would be unknown or undefined when inserting a row into a
> table? (though I guess one could argue that these registers ought to
> evaluate to NULL under such circumstances instead of being impossible
> to use as a column default)
Support or non support more often than not has one reason: resources.
Quite likely when these registers were added DEFAULT was not part of the
requirement. Given that they have been present for a while no one ever
complained (AFAIK) this might well have been the right decision at the time.
Also note that BEFORE triggers support ALL registers and it is highly
unlikely anyone would want to use default values for those on LOAD.
So, mostly we are talking orthogonality here. A desirable property, but
hard to measure in $$.

Cheers
Serge

PS: Name any software product (which I know of course) and I can rattle
down a set of odd limitations.
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
From: Serge Rielau on
Dave Hughes wrote:
> In this case, unfortunately, the only solution is to chop out the
> comments altogether (shame DB2 doesn't support C-style /*..*/ comments
> in which line break chopping doesn't result in ambiguity).
db2 => select /* hello */ 1 from sysibm.sysdummy1;

1
-----------
1

1 record(s) selected.

DB2 V8.2.2 (FP9)

Since Ian has all those drivers maybe he can try it.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
From: Serge Rielau on
Ian Boyd wrote:
>> PS: I find this thread quite interesting actually.
> In a morbid train-wreck sorta way?
Not at all. Calibrating your culture shock.
I sent you an email to ian@..., please let me know if that's the right
email address.

W.r.t. walking a line, it would help to have less repetition.
That can take on the smell of "rubbing it in" which is a property of a
troll.

This group is generally quite friendly compared to others where RTFM is
the standard answer for any beginner question an critique is punishable
by personal attacks.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
From: Jeroen van den Broek on

"Ian Boyd" <ian.msnews010(a)avatopia.com> schreef in bericht
news:duneia0j3g(a)enews3.newsguy.com...
[..]
>
>>>That explains why the reference doesn't include some statements, their
>>>not
>>>the right "kind" of statements.
>>
>> Close. It's because, they are not statements.
>
> i guess this is where some help with examples would be extraordinarily
> useful.
>
>>>i see the majority of the reference is in a section called "Statements".
>>>i
>>>don't see a corresponding section of "control statements"
>>
>> In my (offline) copy, Chapter 1 is "Statements" and Chapter 2 is "SQL
>> control statements".
>
> SQL Reference Volume 1
> Contents
> About this book
> Chapter 1. Concepts
> Chapter 2. Language elements
> Chapter 3. Functions
> Chapter 4. Queries
> Appendix A. SQL limits
> ...
> Appendix Q. Notices
> Index
> Contacting IBM
>
> SQL Reference Volume 2
> Contents
> About this book
> Statements
> Appendix A. DB2 Universal Databse technical information
> Appendix B. Notices
> Index
> Contacting IBM
>
> These are two PDF files that are referred to by the online documentation.
> i reach the online documentation from Control Center by hitting:
> Help->About
>
> On the web-site, i see
> Reference
> SQL
> How to read the syntax diagrams
> Common syntax elements
> Language elements
> Functions
> Procedures
> Queries
> Statements
> Reserved schema names and reserved words
> SQL statements allowed in routines
> Communications areas, descriptor areas, and exception tables
> Explain tables
> Explain register values
> Japanese and traditional-Chinese extended UNIX code (EUC)
> considerations
> Backus-Naur form (BNF) specifications for DATALINKs
>
>
>>>, nor is the keyword DECLARE in the index.
>>
>> It is absolutely in the index. Though, it is not a bookmark.
>>
>> It is in Chapter 2.=>Compound Statement (Procedure) under
>> "SQL-variable-declaration".
>
>> A search of the index (which is a bookmark) found it for me pretty
>> easily.
>
>
> i gotta find this book, web-site, pdf, help file, or eBook you got.
>

Maybe Brian was referring to (an older version of) the SQL Reference for DB2
on zOS ("Mainframe").
The current (v8) version for that book contains the following TOC:

SQL Reference
Contents
About this book
Summary of changes to this book
Chapter 1. DB2 concepts
Chapter 2. Language elements
Chapter 3. Functions
Chapter 4. Queries
Chapter 5. Statements
Chapter 6. SQL control statements
Appendix A. Limits in DB2 UDB for z/OS
Appendix B. Reserved schema names and reserved words
Appendix C. Characteristics of SQL statements in DB2 UDB for z/OS
Actions allowed on SQL statements
SQL statements allowed in external functions and stored procedures
SQL statements allowed in SQL procedures
Appendix D
....
Appendix H. Sample user-defined functions
Notices
Glossary
Bibliography
Index
Readers' Comments -- We'd Like to Hear from You

This book, as all other ones for DB2 v8 for z/OS can be found here:
http://www-306.ibm.com/software/data/db2/zos/v8books.html

If you want similar documentation for DB2 on Linux, Unix and Windows you
have to go here:
http://www-306.ibm.com/software/data/db2/udb/support/manualsv8.html
where you will find the SQL Reference (Vol 1 and 2) you already have.
Next to those however, you may want to take a look at the Command Reference.
The Master Index may also be usefull for determining which document you need
for a specific purpose.

HTH.

--
Jeroen



From: Jeroen van den Broek on

"Jeroen van den Broek" <jeroen(a)NOSPAM.demon.nl> schreef in bericht
news:120usjk5p4rks89(a)corp.supernews.com...
>
[..]
>
> If you want similar documentation for DB2 on Linux, Unix and Windows you
> have to go here:
> http://www-306.ibm.com/software/data/db2/udb/support/manualsv8.html
> where you will find the SQL Reference (Vol 1 and 2) you already have.
> Next to those however, you may want to take a look at the Command
> Reference.
> The Master Index may also be usefull for determining which document you
> need for a specific purpose.
>

More specific w.r.t. the Command Reference:

Chapter 4. Using command line SQL statements

--
Jeroen


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Prev: SQL0901N Error.
Next: Convert DECIMAL to DATE