Monday, October 24, 2011

Android 4.0 (ice cream sandwich)

                       Android’s new version (4.0) released few days ago. lets check what are the new features are introduced by Google in ice cream sandwich to compete Apples ios 5.

nexus s

                

              Android 4.0, Ice Cream Sandwich brings an entirely new look and feel to Android. The lock screen, widgets, notifications, multi-tasking and everything in between has been rethought and refined to make Android simple, beautiful, and beyond smart.

 

 

 

Galaxy Nexus – Video

New features at a glance

  • Face Unlock

ice-cream-sandwich-android-4

       

           With Face Unlock on ice cream sandwich you can now unlock your phone with a smile. No complicated passwords to remember, just switch on your phone and look into the camera to quickly unlock your phone.

  • Android Beam

android beam

     

               Using this android feature you can easily share your contacts,websites,apps,maps,youtube videos etc by touching two android phones each other.

 

  • Voice typing

voice typing

     

    Use your voice to type Emails,SMS or any where you want to type texts

more to read:

  1. Android 4.0 Ice Cream Sandwich: everything you need to know
  2. Android Ice Cream Sandwich and Galaxy Nexus: Everything You Need to Know
  3. iOS 5 vs. Android 4.0 Ice Cream Sandwich vs. Windows Phone 7.5 Mango – Comparison

Sunday, October 9, 2011

Common Table Expression (CTE)

               few days ago I’ve written a  blog post in SQL server using CTE to find  Sundays. Lets dig some more deep in to this SQL server feature.

                                                        microsoft-sql-server-2008

    What is CTE

     The common table expression is a temporary named result set that can refer in a SELECT,INSERT, UPDATE or DELETE statement.

       simply a CTE is similar to a derived table but it is not stored as an object and lasts only for the duration of the query.

    Unlike a derived table, a CTE can be self referencing and can be referenced multiple times in the same query

we can use a CTE in View create statement also we can add CTE in to the new MERGE statement (In sql server 2008)

SQL Server support two types of CTEs

  • recursive
  • non recursive

 Syntax

A Common Table Expression contains three main parts:

  • The CTE name (this is what follows the WITH keyword)
  • The column list (optional)
  • The query (appears within parentheses after the AS keyword)

With CTE_Name (Column_Name_1, Column_Name_2 … Column_Name_n )
As
(
     cte_Query_Definition
)
--TSQL which uses the CTE

Some Examples

WITH Table1(Name,Designation,DateofJoin)
As   
(
    select CN.Name,D.Name,E.DateOfJoin from ContactName CN
    Inner join AM_Employee E on E.ContactId = CN.ContactId
    Inner join AM_Designation D on E.DesignationId = D.Id
)
select Name,Designation,DateofJoin from Table1