490 pts.
 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>

Software/Hardware used:
ASKED: April 23, 2008  4:54 PM
UPDATED: September 23, 2009  7:58 PM

Answer Wiki:
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 Wiki Answer Submitted:  September 23, 2009  7:58 pm  by  Meandyou   5,205 pts.
All Answer Wiki Contributors:  Meandyou   5,205 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _