Date Spread across 2 years? - How to ??
I need to populate a date column for a demo. Table has 100K rows. New column is 'LAST_PURCHASE_DATE'.
I need to update the column with date from sysdate to sysdate - 2years.
I'll be looking to code this earlier this morning, but would appreciate any pearls of wisdom.
SET dateColumn = SYSDATE - MOD(ROWNUM, 730);
Thanks for the input DaPi.
I must be getting better at this coding lark, 'cos that's exactly what I came up with.
Click Here to Expand Forum to Full Width