Showing posts with label microsoft. Show all posts
Showing posts with label microsoft. Show all posts

Thursday, January 1, 2015

String Functions in Transact SQL



       

  •       ASCII


This Function is used to get the ASCII code of the input char. It returns an int value corresponding to the char. For Example :

              SELECT ASCII('c') AS 'ASCII Code' , 'c' AS 'Character';
OUTPUT:
               ASCII Code  Character
      ----------- ---------
      99          c

  •      CHAR


This function is used to get the character corresponding to an integer ASCII code. For Example:

              SELECT CHAR( ASCII('c') ) AS 'Character' , ASCII('c') 'ASCII Code'
OUTPUT:
               Character ASCII Code
      --------- -----------
      c         99

  •      CONCAT


As the name suggests this function is used to join together multiple string. For Example:

             SELECT CONCAT('First Name',’ ’,'Last Name');
OUTPUT:

       First Name Last Name

  •      LEFT


This functions gives us the specified number of character from the left side of a string. For Example:

             SELECT LEFT('First Name',5);
OUTPUT:

       First


  •      RIGHT


This functions gives us the specified number of character from the right side of a string. For Example:

              SELECT RIGHT('First Name',4);
OUTPUT:
       Name


  •       LEN


This function is used to get the length of a given String. For Example:

              SELECT LEN('NAME');
OUTPUT:

       4

  •      LOWER


This functions converts the given string to all LOWER CASE. For Example:

              SELECT LOWER('First Name');
OUTPUT:

       first name

  •       UPPER


This functions converts the given string to all UPPER CASE. For  Example:

               SELECT UPPER('First Name');
OUTPUT:

       FIRST NAME


  •       LTRIM


This functions removes all the extra spaces from a string at the LEFTMOST position. For Example:

       SELECT LTRIM('    First Name');
OUTPUT:

       First Name


       NOTE: This function is only concerned with the LEFTMOST spaces, it will not temper   
             with the middle or rightmost spaces.


  •       RTRIM


This functions removes all the extra spaces from a string at the RIGHTMOST position. For Example:

       SELECT RTRIM('First Name     ');
OUTPUT:

       First Name


       NOTE: This function is only concerned with the RIGHTMOST spaces, it will not temper   


             with the middle or leftmost spaces.


  •       REPLACE


This functions is used to a replace a given pattern in a string to a another pattern. For  Example:

               SELECT REPLACE('First Name','NAME','XXX');
OUTPUT:
       First XXX

'First Name' is the given String.
'NAME' is the pattern to be replaced within the String 'First Name'
'XXX' is the pattern that is added to the the String 'First Name' in place of 'NAME'

       NOTE : If the pattern in not found in the given string then the string is returned as it is with no placement.
                   By default the function searches of the given pattern in the string case-insensitively. To search for the pattern case-sensitively use COLLATION.

  •       REVERSE


This functions is used to REVERSE the order of Character in a String. For  Example:

                SELECT REVERSE ('FIRST NAME');
OUTPUT:
       EMAN TSRIF
       
       SELECT REVERSE(REVERSE ('FIRST NAME'))
OUTPUT:

       FIRST NAME

  •        STR


This functions is used convert a float expression to String. For  Example:

                SELECT STR(5.09,4,3);
OUTPUT:

        5.09

5.09 is the float expression that we want to convert.
4 is the length of total number of characters displayed in the resulting string. If the resulting string exceeds the given length then the result is trimmed from right to match the given length. 

3 is the length of the number of decimal places to be displayed. In Our case we got only 2 numbers after the decimal because the maximum provided length(4) was exceeded.






                  


Sunday, July 15, 2012

Windows 8 Release preview

Windows 8
is out with its first release preview which seems to be extremely stable and very very good.
Microsoft has completely re-thought the design and added the new metro interface, new apps support which is the major break through in windows 8.




it includes a whole new interface and UI which you might find a little bit difficult to use but once use it for a day or two you will love it . there is a lot of flexibility ,you can install new apps from the store the new metro UI .





with a completely re-thought design and UI micrisoft has preserved the old windows 7 experience in it too.
you can easily switch to desktop tile and do your basic work in the old windows 7 style and all the softwares ,drivers ,and devices that are supported by windows 7 will be support by in windows 8 


Multitasking
With new option of snapping apps in left or right multitasking becomes extremely easy and effortless



app downloaded from store
there are only still about a 100 apps in the store but I am sure that most have the developers have started to develop for the metro style apps for windows 8 and the apps should be out before the launch of windows 8 in October.

music app
Microsoft includes some built in apps like music and video app which is pretty sweet .
it contains a rich UI and we can buy or rent music and videos

video app


Store
The store is also made in the metro UI and includes a lot of different categories and we are waiting when these will get flooded with new apps

all new IE10

One more plus point in windows 8 is that you get the new IE10 which is also pretty cool .But Microsoft has to improve a lot in it before it is out in its final release .But off-course you can always switch back to the desktop IE .


setting panel

it syncs with Microsoft account and keeps the settings backed up


One more that Microsoft has added in windows 8 is that is smooth like Buttter
even in the release preview  the are no lags the computer boots up just in 10-20 secs which is extremely fast. You can watch the video below to note the boot time .



Microsoft demonstrates boot time in windows 8



 You should definitely  try windows 8 and do not wait for the final version to come out .
You can download the Release Preview from here.
If You are extra afraid to test Win8 you can first install it in a Virtual Box.
Virtual Box is available for free download here.

You can watch this video on youtube demonstrating to install windows 8 in Virtual Box