Tuesday, February 21, 2017
Monday, February 20, 2017
Monday, February 13, 2017
When I select column of date type within SQLPLUS, I got the following result.
SQL> select txn_date from card_txn where rownum <10; TXN_DATE --------- 02-OCT-11 02-OCT-11 02-OCT-11 02-OCT-11 02-OCT-11 03-OCT-11 23-OCT-11 23-OCT-11 23-OCT-11 9 rows selected.Since I want to see the hour, minute and second of a transaction, I use to_char() to format the date.
SQL> select to_char(txn_date,'YYYYMMDD:hh24:mi:ss') from card_txn where rownum <10; TO_CHAR(TXN_DATE, ----------------- 20111002:22:53:54 20111002:22:21:30 20111002:11:38:17 20111002:23:45:52 20111002:02:19:17 20111003:11:38:17 20111023:23:30:24 20111023:23:30:52 20111023:14:57:46 9 rows selected.If we want to display dates in desired format without using to_char() conversion, we can use the following command. After running this command, all dates will be automatically formatted.
SQL> alter session set nls_date_format='YYYYMMDD:hh24:mi:ss'; Session altered. SQL> select txn_date from card_txn where rownum <10; TXN_DATE ----------------- 20111002:22:53:54 20111002:22:21:30 20111002:11:38:17 20111002:23:45:52 20111002:02:19:17 20111003:11:38:17 20111023:23:30:24 20111023:23:30:52 20111023:14:57:46 9 rows selected.
Friday, February 10, 2017
I could not connect to the Oracle Instance on Amazon RDS platform when I worked in the town library. I followed the following steps and resolved the issue: 1. Find my IP address using Google Search "my ip address". Google will display my ip address 64.64.117.xx. 2. Go to Amazon AWS console/Services/RDS/Dashboard/Instance. Right click the instance and select "See details". 3. From the detail view, click the link to next to "Security Groups". 4. At the bottom section, click Inbound and then Edit 5. Click Add Rule and add the IP address 64.64.117.xx/32.
Wednesday, February 08, 2017
I want to run SQLPLUS interactive command environment to query Oracle databases. When I type my SQL commands and hit return key, I get the response from the database right away. It is like I am having a conversation with the data. To me, this is a more preferable way than using a GUI-based tool. I wrote a post 3 years ago, Oracle SQLPLUS Client Installation on Windows Troubleshooting. But that one was about installing 32 bit version installation. Since I am installing 64 bit version on my Windows Machine, I write down the steps. Step 1. Go to the Oracle site: http://www.oracle.com/technetwork/topics/winx64soft-089540.html Step 2. Accept OTN License Agreement and download the following two files:
Version 220.127.116.11.0 Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications Download instantclient-basic-windows.x64-18.104.22.168.0.zip (72,416,242 bytes) (cksum - 1751087003) Instant Client Package - SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client Download instantclient-sqlplus-windows.x64-22.214.171.124.0.zip (876,515 bytes) (cksum - 1826332995)Step 3. I unzip both zip files and put files under the same directory. I run the following command and am able to connect the my Oracle DB on Amazon cloud. sqlplus email@example.com:1521/mysid
Thursday, January 26, 2017
I am going to give a talk at Department of Computer Science, the University of Massachusetts Boston, on January 31. The following is the abstract: Abstract: Will a new mobile phone customer pay her monthly bill? Is a check deposited into a bank customer’s account fraudulent? Will an insurance claim become expensive? For nearly two decades, Dr. Jiang (Jay) Zhou has been helping mobile phone service providers, banks, insurance companies and other businesses solve problems like these. The predictive models that he built have resulted in over $200 million savings for clients. In the seminar, Dr. Zhou will discuss topics including challenges and best practices when building these predictive models in real world environments.
Wednesday, October 26, 2016
For someone who is looking for a job in data analytics field, high rankings in Kaggle Competition will give him tremendous advantage. Employers see the competition winners having strong problem solving skills and hands-on expertise. Indeed, to be able to complete some projects for Kaggle competitions, participants have to put in a lot of effort to deal with data issues even before any predictive models can be built. This is very similar to that in the real world applications where 80% of time is spent on data cleanse and manipulation. It is not a surprise that some employers prefer Kaggle competition winners over PhD graduates whose skills are perceived as more theoretical. Taking my nephew, Yuyu Zhou, as an example. He got a master degree in data analytics. While he was in school, he spent a few weeks with other classmates to participate in Kaggle competitions. His team has achieved the top 3% and 5% in two Kaggle prediction competitions respectively (see my blog post a Young Data Scientist- Kaggle Competition Top 5% Winner: Yuyu Zhou. Once he graduated, he was quickly hired by a prestigious company and has been earning PhD level salary. Those few weeks he spent on Kaggle Competition was the best time investment of his life.