I understand that if I use a 2-digit year, then the valid date range is 1940 - 2039. But I thought if I use a 4-digit year (YYYYMMDD), then I should be able to have all years. However, this isn't what I'm seeing...

Why does this work:

Code:

```
select date(timestamp_format('19400630','YYYYMMDD'))
from sysibm/sysdummy1
```

Code:

```
select date(timestamp_format('19390630','YYYYMMDD'))
from sysibm/sysdummy1
```

Btw, my goal is to find invalid birth dates in our database that need to be corrected (they're stored as separate numeric fields CC, YY, MM, and DD), but old people with valid birth dates are being returned.]]>

Does iSeries SQL provide a way of updating part of that document, e.g. changing the value of a specific element?

DB2 for z/OS provides the XMLMODIFY() function for this task, but I cannot find an equivalent for iSeries DB2]]>

Thanks in advance!!!]]>

So currently after my SQL statement (it sums item sales for a specific year and class) runs, I have the following columns in one resulting row:

Year, Period, Class, SalesQty1, Sales$1, SalesQty2, Sales$2, SalesQty3, Sales$3, ... , SalesQty12, Sales$12

I would like 12 rows instead that look like this:

Year, Period, Class, SalesQty1, Sales$1

Year, Period, Class, SalesQty2, Sales$2

Year, Period, Class, SalesQty3, Sales$3

...

Year, Period, Class, SalesQty12, Sales$12

My SQL statement is currently something like:

Code:

select max(GCLS) as Class, max(GFY) as Year, sum(GQ01) as SalesQty1, sum(GA01/100) as Sales$1, sum(GQ02) as SalesQty2, sum(GA01/100) as Sales$2, sum(GQ03) as SalesQty3, sum(GA01/100) as Sales$3, sum(GQ04) as SalesQty4, sum(GA01/100) as Sales$4, sum(GQ05) as SalesQty5, sum(GA01/100) as Sales$5, sum(GQ06) as SalesQty6, sum(GA01/100) as Sales$6, sum(GQ07) as SalesQty7, sum(GA01/100) as Sales$7, sum(GQ08) as SalesQty8, sum(GA01/100) as Sales$8, sum(GQ09) as SalesQty9, sum(GA01/100) as Sales$9, sum(GQ10) as SalesQty10, sum(GA01/100) as Sales$10, sum(GQ11) as SalesQty11, sum(GA01/100) as Sales$11, sum(GQ12) as SalesQty12, sum(GA01/100) as Sales$12 from myFile where GCLS = :myclass and GFY = :myYear