5

Can sed be used to generate a load file for my date lookup fact table?

view full story
linux-howto

http://unix.stackexchange.com – I have an SQL fact table which is used for looking up a date and returning another date. The table schema is as follows: TABLE date_lookup ( pk_date DATE, plus1_months DATE, plus2_months DATE, plus3_months DATE ); UNIQUE INDEX on date_lookup(pk_date); I have a load file (pipe delimited) containing dates from 01-28-2012 to 03-31-2014. The following is an example of the load file: 01-28-2012|02-28-2012|03-28-2012|04-28-2012| 01-29-2012|02-29-2012|03-29-2012|04-29-2012| 01-30-2012|02-29-2012|03-30-2012|04-30-2012| 01-31-2012|02-29-2012|03-31-2012|04-30-2012| ... 03-31-2014|04-3 (HowTos)