Tooltip using CSS

Date March 31, 2010

Do you want to have custom tooltip without using JavaScript in your website? Using following code you will have custom tooltip in your website.


Now use following HTML code that will generate custom tooltip on link.

This is Custom Tooltip Custom Tooltip.

Inner <SPAN> html tag in <A> is using for tooltip text. By default this text is hidden popped up when user move mouse on Link.

Example:
This is Custom Tooltip Custom Tooltip.

Data Mining in SQL Server 2008

Date March 30, 2010

Microsoft SQL Server 2008 empowers informed decisions with predictive analysis through intuitive data mining ─ seamlessly integrated within the Microsoft Business Intelligence platform and extensible into business applications.

Top New Features

  • Test multiple data mining models simultaneously with statistical scores of error and accuracy and confirm their stability with cross validation.
  • Build multiple, incompatible mining models within a single structure; apply model analysis over filtered data; query against structure data to present complete information, all enabled by enhanced mining structures.
  • Combine the best of both worlds by blending optimized near-term predictions (ARTXP) and stable long-term predictions (ARIMA) with Better Time Series Support
  • Discover the relationship between items that are frequently purchased together by using Shopping Basket Analysis; generate interactive forms for scoring new cases with Predictive Calculator, delivered with Microsoft SQL Server 2008 Data Mining Add-ins for Office 2007.

Google Transliteration

Date March 10, 2010

Google Transliteration allows you to type phonetically using roman characters. Simply type a word the way it sounds in English and Google Transliteration will convert it to its local script. We currently support 19 languages: Amharic, Arabic, Bengali, Greek, Gujarati, Hindi, Kannada, Malayalam, Marathi, Nepali, Persian, Russian, Sanskrit, Serbian, Punjabi, Tamil, Telugu, Tigrinya and Urdu.

Example:
http://www.google.com/transliterate/

Generate series using T-SQL

Date February 26, 2010

It is common developer requirement to get missing records from series. For that they generate temporary table and insert complete list of numbers and then find missing numbers using LEFT JOIN. In SQL Server 2005 and 2008, new keyword “WITH” introduced that works with SELECT, INSERT and UPDATE statement that use to create temporary resultset using Common Table Expression (CTE).

Example 1:


      BEGIN
            WITH mycte AS
            (
                  SELECT 1 id
                  UNION ALL
                  SELECT id + 1
                  FROM    mycte
                  WHERE  id + 1 < = 100
            )
            SELECT id
            FROM mycte
            OPTION (MAXRECURSION 0)
        End

Example 2:
A company awarded performance award to their employee each year. Requirement is to find out the list of year in which performance award did not given to any employee.


      BEGIN
            Create Table Performance (EmployeeID int, [Year] int);
            Insert Into Performance VALUES (100, 2001);
            Insert Into Performance VALUES (200, 2003);
            Insert Into Performance VALUES (150, 2007);
            Insert Into Performance VALUES (155, 2008);

            WITH mycte AS
            (
                  -- suppose 2001 is the first year of the company
                  SELECT 2001 As AwardedYear
                  UNION ALL
                  SELECT AwardedYear + 1
                  FROM    mycte
                  WHERE  AwardedYear + 1 < = Year(GetDate()) - 1
            )
            SELECT t.AwardedYear
            FROM mycte t LEFT JOIN Performance P ON (t.AwardedYear = P.Year)
            WHERE P.Year IS NULL
            OPTION (MAXRECURSION 0)
            -- MAXRECURSION 0 means there is no limit of query recursion
        End

Subscribe to Technology Tips

Subscribe to Saqib-Ansari via RSS

Or, subscribe via email: