From: Hardy on
On 1月22日, 上午2时36分, Serge Rielau <srie...(a)ca.ibm.com> wrote:
> On 1/21/2010 9:27 AM, Tonkuma wrote:>> shouldn't this be mentioned in the manuals somewhere? I hard a really
> >> hard time finding information relevant to this problem (I usually
> >> don't post to get help).
> > Yes, it's not so directly documented.
> > Related with two items(both are documented in the manual "DB2 SQL
> > Reference Volume 1") additional to function resolution algorithm.
> > 1) A character string constant specifies a varying-length character
> > string.
> > 2) Promotion of data types.
> > OK: CHAR to VARCHAR, CLOB
> > OK: VARCHAR to CLOB
> > Not: VARCHAR to CHAR
>
> ..you will have similar problems when using a SMALLINT parameter since
> literal numbers are at least INTEGER.
>
> Note that in DB2 9.7 implicit casting kicks in. At that point DB2 will
> downcast the varchar to char and find the function.
>
> Another think you may consider is to us:
> db2set DB2_COMPATIBILITY_VECTOR=100
> (db2stop/db2start)
> That setting makes all char literals smaller than 255 CHAR.
> It was introduced in an early DB2 9.5 Fixpack I believe...
>
> Cheers
> Serge
>
> --
> Serge Rielau
> SQL Architect DB2 for LUW
> IBM Toronto Lab

In DB2 9.7, by default setting, anyhe's original two functions will
both work well. DB2 9.7 changes a lot.
From: Serge Rielau on
Indeed. Wait until you see FP2. More good stuff. :-)


--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab

From: Hardy on
On 1月23日, 下午2时50分, Serge Rielau <srie...(a)ca.ibm.com> wrote:
> Indeed. Wait until you see FP2. More good stuff. :-)
>
> --
> Serge Rielau
> SQL Architect DB2 for LUW
> IBM Toronto Lab

wow~ The curiority can kill a cat. Before you can give me a ppt, a
question, is there any plan for something like Oralce pipeline
feature?

btw, I'm so encouraged by db2 purescale... finally we got one can
really beat RAC. Though I really want to see one live project using
db2 purescale cluster, the customer I'm working now seems more
interested in DB2 for zOS~


From: Serge Rielau on
On 1/24/2010 7:11 AM, Hardy wrote:
> On 1月23日, 下午2时50分, Serge Rielau<srie...(a)ca.ibm.com> wrote:
>> Indeed. Wait until you see FP2. More good stuff. :-)
>>
>> --
>> Serge Rielau
>> SQL Architect DB2 for LUW
>> IBM Toronto Lab
>
> wow~ The curiority can kill a cat. Before you can give me a ppt, a
> question, is there any plan for something like Oralce pipeline
> feature?
Do you mean pipelines table functions?
If I understand them correctly they are a pretty good match to a Java or
C Table function in DB2 which is also pipelined.

Cheers
Serge


--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab

From: Hardy on
On 1月25日, 上午6时46分, Serge Rielau <srie...(a)ca.ibm.com> wrote:
> On 1/24/2010 7:11 AM, Hardy wrote:> On 1月23日, 下午2时50分, Serge Rielau<srie...(a)ca.ibm.com>  wrote:
> >> Indeed. Wait until you see FP2. More good stuff. :-)
>
> >> --
> >> Serge Rielau
> >> SQL Architect DB2 for LUW
> >> IBM Toronto Lab
>
> > wow~  The curiority can kill a cat. Before you can give me a ppt, a
> > question, is there any plan for something like Oralce pipeline
> > feature?
>
> Do you mean pipelines table functions?
> If I understand them correctly they are a pretty good match to a Java or
> C Table function in DB2 which is also pipelined.
>
> Cheers
> Serge
>
> --
> Serge Rielau
> SQL Architect DB2 for LUW
> IBM Toronto Lab


yes, by this way database can process query in a more memory-saving
and even potentialy more efficent way. Serge, could you give some
example to use java/c table function to pipeline the data? Thanks.