Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Create Table with DATE

$
0
0
I use DB2 9.7 LUW with AIX 6.1. I'm creating a new table with a Date field.
I need to format the field so it accepts the data input. Here is the Create Table statement that I'm using now:

CREATE TABLE "PRODDTA"."F5541021" (
"MONTH_YEAR" DATE NOT NULL WITH DEFAULT,
"BRANCH" GRAPHIC(4) NOT NULL WITH DEFAULT,
"CUST_NO" DECIMAL(8,0) NOT NULL WITH DEFAULT,
"CUSTOMER" VARCHAR(40),
"INVENTORY_WEIGHT" DECIMAL(15,0) )
IN "PRODDTAT4K" INDEX IN "PRODDTAI" LONG IN "PRODDTAL" NOT LOGGED INITIALLY ;

I'm looking at the MONTH_YEAR field in particular here. I need to know how to create this field so the data will import. Here is an example of two rows of data below, but this data can be edited in the file, to be able to import to the table also:

2012/12/01,1001,11338,APPLETON COATED LLC,2442664.2
2012/12/01,1001,11342,ASTEN JOHNSON,48801

I'm use to Julian dates, but want to be able to use a real date value. Can anyone give me an example or tell me what they would do here? Thank you so much!

CC

Viewing all articles
Browse latest Browse all 13329

Trending Articles