Territory code in UDB DB2 database
480 pts.
0
Q:
Territory code in UDB DB2 database
A reader wrote in with this question:
<i>Can you explain the meaning of the territory code when creating a db2 udb database? Certain documentation say that the territory code determines the way dates are displayed but I've experimented by creating several databases with different territory codes but I don't see any difference when using these databases.</i>
ASKED: Apr 23 2008  4:54 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
1840 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
I don't know specifically about the "territory code" (never worked on little DB2) but it sounds like the parameters ".

DB2 SQL can format dates & times in several different formats

try running the following to see what I mean:
SELECT CURRENT DATE AS "DEFAULT FORMAT"
,CHAR(CURRENT DATE,ISO) AS "ISO FORMAT"
,CHAR(CURRENT DATE,USA) AS "U.S.A. FORMAT"
,CHAR(CURRENT DATE,EUR) AS "EUROPEAN "
FROM SYSIBM.SYSDUMMY1;

Then substitute TIME for DATE and run it again.

Here is sample SQL to do even more things with DATE (& TIME)

SELECT YEAR(date_col) YYYY, DAYOFYEAR(date_col) JJJ

SELECT
CASE MONTH(CURRENT DATE)
WHEN 1 THEN 'JANUARY '
WHEN 2 THEN 'FEBRUARY '
WHEN 3 THEN 'MARCH '
WHEN 4 THEN 'APRIL '
WHEN 5 THEN 'MAY '
WHEN 6 THEN 'JUNE '
WHEN 7 THEN 'JULY '
WHEN 8 THEN 'AUGUST '
WHEN 9 THEN 'SEPTEMBER '
WHEN 10 THEN 'OCTOBER '
WHEN 11 THEN 'NOVEMBER '
WHEN 12 THEN 'DECEMBER '
END

Good luck

meandyou
Last Answered: Sep 23 2009  7:58 PM GMT by Meandyou   1840 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0