Tag Archives: SQL tricks

Easy Way To Randomize Records

There are some fancy ways to create random records. Some formulas/codes generate random numbers between 0/1, some others pick every Nth record. This method is very simple and works by creating a new ID string for each record and then … Continue reading

Posted in Interesting SQL Patterns | Tagged , , | Comments Off on Easy Way To Randomize Records

Converting Character Date To Datetime

I run into an interesting conversion situation when a vendor returned some birthdate data in a text format and I needed to convert it to Datetime to insert the records into the data warehouse. The obvious Cast and Convert did … Continue reading

Posted in Interesting SQL Patterns | Tagged , , | Comments Off on Converting Character Date To Datetime