What are SQL Query Hints?

July 5, 2014 Leave a comment

SQL server usually selects the best query plan required to execute a T-SQL query. However, there might be cases where the plans selected are not the best. In such situations, you can use the query hints to suggest the best possible plan/method of executing a query. The Query hints can be applied on all operators in a query. These hints apply to SELECT, DELETE, INSERT, UPDATE and MERGE. You can use the Query hints in the OPTION clause after the query.

Few commonly used Query hints with examples are as below.

Read more…

 

Advertisements

SSIS : Using and Configuring For Loop Container

July 5, 2014 Leave a comment

What is For Loop Container?

For loop defines a repeating control flow. It has similar behavior as the “FOR” loop available in programming languages.  The For Loop container uses 3 expressions as definition

  1. Initialization expression:  it assigns value to the loop counters. This expression is optional.
  2. Evaluation expression : It contains the expression to test whether the loop should continue executing  or exit.
  3. An optional iteration expression that increments or decrements the loop counter.

The expressions used must be valid SSIS expression. A variable is generally used in the expression.

Using and Configuring For Loop Container

(Task in hand: print counter variable value for each iteration times.)

Drag a for loop container into the SSIS Control flow window from the Toolbox. Double click on the for loop container to view the “For Loop Editor”. As mentioned earlier it contains 3 expressions. Now create a variable by name “TestVariable” of type “int32”.

Use this variable as counter in the container using expressions as shown below.

Read more…

 

 

Advantages and differences between CHAR and VARCHAR datatypes in SQL Server

April 25, 2014 1 comment

Everyone reading this must have come across these datatypes, but have you ever thought what are the differences and advantages between these two?

The obvious difference that comes to our mind is related to the length. Yes! You are right. The varchar supports variable length and Char supports fixed length. This is the main advantage varchar datatype. for example,  let us consider varchar(10) and char(10) . To store “GEEKEPISODE”, both the datatypes will use the complete length allocated and to store “GEEK”, CHAR datatype will use the complete 10 characters  allocated, but VARCHAR will use only 4.

From the above examples it might seem that VARCHAR is better than CHAR all the time. But remember, CHAR was included as a separate datatype because it has certain advantages over VARCHAR.

Flappy Bird APK download

February 13, 2014 1 comment

Flappy Bird‘s creator, Dong Nguyen, removed the app from the Google Play and iOS App Stores. While smartphone owners who’ve already downloaded the app can keep flapping away, those who figured Flappy Bird looked appealing but hadn’t yet bothered to put the game on their phone have now missed their window.

Download the game from HERE or from this LINK.

Beware there are some fake Flappy Bird APK’s online pretending themselves as the genuine working one.

Google Nexus 4

November 5, 2012 1 comment

nexus 4

The Best android phone is here Google Nexus 4, built by LG in collaboration with Google.

Read More . . . .

Best iPhone apps: Updated

October 31, 2012 Leave a comment

A list of the best iPhone apps available, from time-saving productivity tools to fun apps you won’t be able to put down.

Most-wanted

 

Read More . . .

Improve the battery life on Samsung Galalxy S3

September 26, 2012 Leave a comment

Out of the box the Samsung Galaxy S III has great battery life, but this will further help you get the most out of the device. On paper, a smart phone will beat a regular phone in every single area except for one — battery life. At least there are a few things that you can do to improve your Samsung Galaxy S3’s staying power and extend your fun time with your cherished new mobile.

Samsung Galalxy S3

 

Read more . . . .