Archive

Posts Tagged ‘SQL Server 2012’

SQL Server 2012 new Features

June 21, 2016 Leave a comment

Column store indexes

  • Non-clustered index
  • There is a limit of one columnstore index per table.
  • An index can be created before there is data in the table.
  • A table with a columnstore index cannot be updated

Column store indexesColumn store indexes_1

Contained database

  • Database with meta-data information, security information etc with in the database itself
  • Helps in migrating databases with user accounts

User Defined roles

  • Server Level Roles

User Defined roles

 

Tabular Model

Tabular Model

 

DQS Data Quality Services

DQS

DQS Flow

  • Build Rule

DQS-Build Rule

  • Transform Rule (IND to India)

DQS-Transform Rule

  • Create New DQS project

Create New DQS project

  • Select DataSource

DQS-Select DataSource

  • Process Data

DQS-Process Data

  • Result

DQS-Result

 

Always On

  • AlwaysOn =Mirroring + Clustering
  • AlwaysOn they need to be in full recovery mode and backed up (preferably to a share that’s visible from the other nodes).

Always On Feature Disable Error

Always On

 

Hope you like this post.

Please provide your valuable feedback through liking the post or adding comments. It will help to encourage to do lot of similar stuff.

Thanks

Prasad

Learn Different BI Tools
Subscribe my YouTube Channel : Know BI Tools

 

T-SQL 2012 New Functions

June 20, 2016 Leave a comment

 

Date and time functions

  1. DATEFROMPARTS

Syntax:- DATEFROMPARTS(Year, Month, Day)

Arguments:- year Integer expression specifying a year.

                      month Integer expression specifying a month, from 1 to 12.

                      day     Integer expression specifying a day.

Return Type:– Date

DATEFROMPARTS

2. DATETIMEFROMPARTS

Syntax:- DATETIMEFROMPARTS ( year, month, day, hour, minute, seconds, milliseconds )

Arguments:-

year Integer expression specifying a year.

  month  Integer expression specifying a month.

  day      Integer expression specifying a day.

  hour     Integer expression specifying hours.

  minute Integer expression specifying minutes.

  seconds Integer expression specifying seconds.

  milliseconds Integer expression specifying milliseconds.

Return Type:- datetime

DATETIMEFROMPARTS

3. DATETIME2FROMPARTS

Syntax:- DATETIMEFROMPARTS ( year, month, day, hour, minute, seconds, milliseconds )

Arguments:- year Integer expression specifying a year.

  month  Integer expression specifying a month.

  day      Integer expression specifying a day.

  hour     Integer expression specifying hours.

  minute Integer expression specifying minutes.

  seconds Integer expression specifying seconds.

  milliseconds Integer expression specifying milliseconds.

Return Type:- datetime

DATETIME2FROMPARTS

4.SMALLDATETIMEFROMPARTS

Syntax:- SMALLDATETIMEFROMPARTS ( year, month, day, hour, minute )

Arguments:-

  Year – Integer expression specifying a year.

  Month-Integer expression specifying a month.

  Day Integer expression specifying a day.

  Hour Integer expression specifying hours.

    Minute Integer expression specifying minutes.

Return Type:- smalldatetime

SMALLDATETIMEFROMPARTS

5.DATETIMEOFFSETFROMPARTS

DATETIMEOFFSETFROMPARTS ( year, month, day, hour, minute, seconds, fractions, hour_offset, minute_offset, precision )

6.TIMEFROMPARTS

TIMEFROMPARTS ( hour, minute, seconds, fractions, precision )

7.EOMONTH 

EOMONTH ( start_date [, month_to_add ] )

EOMONTH

  • Logical functions

    1. CHOOSE ( index, val_1, val_2 [, val_n ] ) 

      CHOOSE

    2. IIF ( boolean_expression, true_value, false_value )SELECT IIF ( 20 > 10, ‘true’, ‘false’ ) AS Result;

      SELECT IIF ( 45 > 30, NULL, NULL ) AS Result;

      DECLARE @P INT = NULL, @S INT = NULL;

      SELECT IIF ( 45 > 30, @p, @s ) AS Result;

  • String functions

    1. CONCAT ( string_value1, string_value2 [, string_valueN ] )CONCAT

    2. FORMAT ( value, format [, culture ] )FORMAT
  • Conversion functions

    1. PARSE ( string_value AS data_type [ USING culture ] )PARSE
    2. TRY_PARSE ( string_value AS data_type [ USING culture ] )TRY_PARSE
    3. TRY_CONVERT ( data_type [ ( length ) ], expression [, style ] )TRY_CONVERT
  • Sequence

    Sequence Objects

  • Offset

First mark the start of the row by using “OFFSET” command.

Second specify how many rows you want to fetch by using “FETCH” command.

offset

Hope you like this post.

Please provide your valuable feedback through liking the post or adding comments. It will help to encourage to do lot of similar stuff.

Thanks

Prasad

Learn Different BI Tools
Subscribe my YouTube Channel : Know BI Tools