From today, I have started this new series of posting about a new thing that I have learnt everyday.
So guys keep watching for new things everyday....

(1.) OUTER APPLY & EXCEPT in SQL 2005 + - 1st June 2010

Today I have learned about the OUTER APPLY & EXCEPT keywords that have been added in SQL SERVER 2005 & later editions, whic is useful to return data from one table which is not in another table.

Lets see an example.

CREATE TABLE testnulls (ID INT)
INSERT INTO testnulls VALUES (1)
INSERT INTO testnulls VALUES (2)
INSERT INTO testnulls VALUES (null)
CREATE TABLE testjoin (ID INT)
INSERT INTO testjoin VALUES (1)
INSERT INTO testjoin VALUES (3)
OUTER APPLY:  is something that got added to SQL 2005
SELECT j.*
   FROM testjoin j
   OUTER APPLY (
      SELECT id
      FROM testnulls n
      WHERE n.ID = j.ID
   ) a
WHERE a.ID IS NULL
EXCEPT: was added in SQL 2005. It returns everything from the top table which is not in the bottom table. 
SELECT * FROM testjoin
EXCEPT
SELECT * FROM testnulls
Feel free to post ur comments..

(2.) How to make ur ASP.NET/HTML Websites Indic Aware - 2nd June 2010

I knew ASP.NET provides Localization support which means we can change the language of the website, but I didnt know that we can even now accept input in Indic languages like Gujarati, Tamil, Telugu, Hindi, etc, until I came to know about it through one of the Microsoft guys - http://geekswithblogs.net/ranganh/archive/2010/03/15/making-your-asp.nethtml-websites-indic-aware-ndash-accepting-tamil-telugu.aspx 


Microsoft have released the scripts so that the Indic input feature can be encapsulated into your own websites.  For example, if you are having a web page where you collect user information, you can pretty much make your site indic aware i.e. accept inputs in Gujarati, Tamil, Telugu, Kannada, Hindi etc.,  All you would need to include would be a bunch of scripts onto your web pages and you are ready to make it, like I said, “indic aware”.

NOTE: This is not translation but transliteration where as the users type in English and use one of the delimiters (space etc.,) the word converts into the Indic language word.  So, if you type Gujarati, it converts to ગુજરાતી 

You can get the scripts released by Microsoft for adding the Indic Language feature from this link : http://specials.msn.co.in/ilit/Gujarati.aspx

I myself tried it by making a small webpage that accepts FirstName, LastName, Address & an additional field. I have set to accept Gujarati as input, you can select the language of ur choice.
Except the additional field which I have set to accept English, rest will accept Gujarati. 

The code for it as follows: 

Image and video hosting by TinyPic

I have taken a screenshot as well so all can see how it works.

Image and video hosting by TinyPic


So now you can now add the Web Version of Microsoft Indic Language Input Tool (ILIT) to your website so that your visitors can easily enter Indic language text on the site. This facilitates easy search, form-filling and discussions in any Indic language on your site by anyone who visits it.

Currently the languages supported are : Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Oriya, Punjabi, Tamil & Telugu.

This service is provided free for non-commercial use only.

So go ahead & use it in your websites & tell me the feedback..