Amazon Enters Data Warehousing Field Via Amazon Redshift Service

On November 28, Amazon announced it is entering the data warehousing field by announcing the Amazon Redshift service. Amazon Redshift is build on the ParAccel database platform, which can be accessed using SQL. Users can connect to the Amazon Redshift data warehouse using standard PostgreSQL JDBC or ODBC drivers. In addition, Amazon Redshift is already certified by Jaspersoft and MicroStrategy, two of the leading BI tools in the marketplace.

Continue reading

Find Duplicates in SQL

SQL does not provide a built-in capability to find duplicates in a table. Fortunately, it is fairly easy to write a SQL query that does it. The idea is to count the number of occurrences for each value, and then use the HAVING condition to show only the values that appear more than once.

SELECT COLUMN_NAME, COUNT(*)
FROM TABLE_NAME
GROUP BY COLUMN_NAME
HAVING (COUNT(*) > 1);

Continue reading

BOTW Cyber Monday 2012 Promo Code 50% Off

Best of the Web (BOTW) has just announced its biggest sale in 2012: Use Promo Code CYBER50 to get 50% off all listings. This promo code is good for 2012 Cyber Monday (November 26, 2012) only.

I have been following BOTW’s promotions this year, and the best I’ve found so far is 20% off. So, if you’ve been thinking about submitting to the BOTW directory, but have been hesitant because of the price, now is the time to act!

File Transfer Between Android and PC

There are many occasions when we want to transfer files between our Android device and our PC. One way to do this is to connect the Android device to the PC via a USB cable. On the other hand, sometimes this does not work for a variety of reasons. Below I describe how I set up my Android and PC so I can transfer files between them.

File transfer from Android to PC

I use Bluetooth for this, and there are two components: Hardware and software. On the hardware side, you’ll want to make sure your PC is Bluetooth-ready. My PC did not have Bluetooth capabilities, so I bought a Bluetooth adapter (IOgear IOGBU421) to make sure my PC can communicate via Bluetooth. On the software side, I used Bluetooth OBEX File Transfer from Medieval Software. I downloaded and installed the PC version, and then I downloaded and installed the Android app version to my Android phone. Both versions are free. Once installations are complete, start the app in Android, and then open the file transfer program in PC. You’ll be able to connect to your Android device and download the files from your Android device.

Continue reading

Copy a table in SQL

In a relational database, sometimes there is a need to copy a table in SQL. This post talks about several different scenarios on doing this, and how to use SQL to accomplish each scenario.

Copy a table with all data

To copy a table with all the data, simply create a new table and populate the table with SELECT * from the original table. This will copy over the table structure as well as all the data that was in the original table.

The syntax you would use is

CREATE TABLE TABLE_NAME_2
SELECT * FROM TABLE_NAME 1;

Please note that this will not copy over the constraints or indexes associated with this table.

Continue reading