Feb 23, 2010
I ran into the challenge of updating a database (oracle) table with a random date and thought that my solution might help someone else with a similar challenge. Here goes…
First you need to get the Julian day number for your start date. Start date is the date from where you want to begin the randomization. Use the following SQL statement to get that number…
SELECT TO_CHAR(TO_DATE('2010-01-01', 'YYYY-MM-DD'), 'J') FROM DUAL;
When you run the above SQL query, the cursor should show ‘2455198‘. Now that you have the julian value for your start date, you can use the following statement to generate a random value between your start date and any number of additional dates. In the example below, I am adding 120 additional days to my start date so my range will be Jan-01-2010 till Apr-30-2010.
SELECT TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2455198, 2455198+120)), 'J') FROM DUAL;
From here, a simple update statement should do the trick!
UPDATE table_name SET column_name = (SELECT TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2455198, 2455198+120)), 'J') FROM DUAL);
Hope this saved you some time!
Feb 15, 2010

(via @gizmodo)
for more gory details, check out this post.
Feb 12, 2010

Warning! by proceeding you may subject yourself to bouts of “OH MY GOD” or “CRAP, THIS IS UNREAL”!
….go ahead, click here to see how much Google knows about you. This is not a hack or any kind of special trick, it’s a service that Google provides (out of the goodness of their own hearts?) to all it’s users (albeit it’s buried in some obscure area of your profile). Does it not just raise your spirits to know how much one company knows about you, your personal life (including your friends, preferences, habits, etc, etc, etc)? I knew that they provide a ton of free services and that all of these services collect some amount of identifiable data but seeing all the data that they collect/have access to laid out this way….gives me the creeps.
This is one reason why I turned off Google Buzz today (an encourage you to do so as well…read this post for a reality check). I liked the idea behind Buzz, it’s the implementation that was a major FAIL. Hopefully they will fix it…soon.
You can opt out of Google’s interest based advertising here. Or better yet, use the Network Advertising Initiative to opt-out of several ad networks at once.
Rock on.