SQL CASE Statements

Case Statement is a conditional statement which has WHEN, THEN and ELSE clauses with an END terminator.

Case Statement is like IF-ELSE statement, where it will check the condition, if it is true, it will return the value in the THEN clause, if false will return the value in ELSE clause. The ELSE clause is optional.

The syntax is

CASE expression
when value1 then [return value1]
when value2 then [return value2]
when value3 then [return value3]
ELSE [return value]
END

The another syntax is

CASE
when selector1 = value1 then [return value1]
when selector2 = value2 then [return value2]
when selector3 = value3 then [return value3]
ELSE [return value]
END

Druid Installation

  • Download the latest version of Druid 3.8 by using the below link

    http://webscripts.softpedia.com/script/Database-Tools/Druid-24778.html and save the file.

  • The druid file will be in the .jar format , copy it to the desktop and extract it.

  • Go to Applications -> Accessories -> Terminal to open the Terminal window.

  • To install the .jar file, the following command need to be typed in this window,

    fp016@pbs016:~$ cd ..
    fp016@pbs016:/home$ cd fp016
    fp016@pbs016:~$ pwd
    /home/fp016
    fp016@pbs016:~$ cd Desktop
    fp016@pbs016:~/Desktop$ java -jar druid-3.8-install.jar

  • Specify the path for the file, so that it will get installed.

Druid Configuration

  • Copy the oracle_jar file to the Desktop.

  • Open the Druid application, click on the “config” menu and select JDBC drivers on the top.

  • JDBC drivers window opens, click the “New” button and select the oracle_jar file and click ok button.

  • The driver connection will be established, now can import database inside Druid.

How to Re-install oracle 10g universal in Ubuntu

Step 1: Go to Applications – Accessories – Terminal, Terminal window opens

Step 2: Type the command,
sudo dpkg -P oracle-xe-universal

Step 3: All the files and configuration files will get deleted.

Step 4: Check the folder “/usr/lib”, if it contains oracle folder then delete it.

Step 5: Restart the computer.

Step 6: Install the “oracle-xe” package in your system.

Step 7: Then configure it using the command,
sudo /etc/init.d/oracle-xe configure

Installation of .jar file on Ubuntu

  • Open the Terminal window.

  • Type the following command,
    java -jar filename.jar

  • Specify the path name and install it.

Oracle Database XE server configuration on Ubuntu

These are the steps which need to be followed in order to access the Oracle Database Home Page.

  • Open the Terminal window.

  • Type the following command,
    sudo /etc/init.d/oracle-xe configure

  • Enter the sudo password.

  • Specify the port for oracle application as “8080”.

  • Specify the port for Database listener as “1521”.

  • Give the password to be used for database accounts and confirm it.

  • Press ‘y’ so that the oracle database will be started on boot.

  • It will specify the url for the database home page.

  • To access the Database Home Page go to http://127.0.0.1:8080/apex on the browser window.

  • Login by entering the Username and password.

Setting up of Google Analytics in Word Press

Steps in Google Analytics:

  • Open the URL http://www.google.com/analytics/

  • Click the Access Analytics button.

  • Sign in with your Google Account.

  • Click the Sign Up button.

  • Enter your Website’s URL, Account Name and Select the Time Zone Country and click Continue.

  • In the next step, fill the First name, last name and country and click continue again.

  • Agree to the terms and click the Create New Account button.

  • Code will be displayed which need to be pasted on your site inorder to Add Tracking. Copy that code and click Save and Finish button.

  • A window is displayed where you can view the Site Usage by clicking View Report.

  • After clicking View Report , the following window is displayed.

  • Login to your WordPress.

Steps in Word Press:

  • Login to your WordPress Dashboard. Add Google Analyticator plug-in and Install it.

  • Activate it and click on the Google Analytics which is available under the settings tab.

  • Click on the link to Authenticate with Google and then change the Google Analytics logging to Enabled.

  • Enter the Google Analytics UID in the text box from the code which you copied in the above process and Click Save Changes.

  • Google Analytics set up process has been made for your wordpress blog, now you can check your site usage.

WordPress Installation on Ubuntu

Step 1: Download the wordpress 2.8.6 tar.gz version from the website,
http://wordpress.org/download/release-archive/
and select “2.8.6 tar.gz”.

Step 2: WordPress will be downloaded in the download folder, so it should be extracted to the htdocs folder which is inside opt

Step 3: To extract, the following command is used,
sudo tar xvfz wordpress 2.8.6 tar.gz -C /opt/lampp/htdocs

Step 4: Open the web browser and go to http://localhost/wordpress/ The following window will appear


Step 5: Click the “Create Configuration file”, it will display the following window, but we need to give permission to wordpress folder to access the file.

Step 6: In order to configure the wordpress, the first process will be, open the terminal window and give the following commands,
fp016@pbs016:~$ cd ..
fp016@pbs016:/home$ cd ..
fp016@pbs016:/$ cd opt
fp016@pbs016:/opt$ cd lampp
fp016@pbs016:/opt/lampp$ cd htdocs
fp016@pbs016:/opt/lampp/htdocs$ sudo chmod -R 777 wordpress

Step 6: Refresh the website, http://localhost/wordpress/ The following window will appear

Step 7: Click the “Let’s Go” button.

Step 8: Enter the default username as “root” and dont mention any password for it and click “SUBMIT” button in the below window.

Step 9: Click the “Run the install” button.

Step 10: Enter your blog name and your email address and click ” Install WordPress” button.

Step 7: Access the website , http://localhost/shreewordpress/wp-admin/ by specifying username and password

Step 8: This is how your Dashboard look like.

Follow

Get every new post delivered to your Inbox.