SQL Server 2008
 
Pivot --> Datatype (SQL Server 2008)
Pivot
Condition
Datatype
P-AutoIdentifier
 
uniqueidentifier
P-Binary
 
binary(@L)
P-Boolean
 
bit
P-Byte
 
bit
P-Character
Not Unicode and (L<8001 or L ø)
char(@L)
Not Unicode and (L=8001 or L ø)
nchar(@L)
Not Unicode and L>8000
ntext
Not Unicode and L>8000
text
P-Currency
L not empty or L > 10
money
L empty or L < 11
smallmoney
P-Date
 
smalldatetime
P-Datetime
 
datetime
P-Decimal
 
decimal(@L,@D)
P-Double
 
numeric(@L,@D)
P-Float
L empty
float
L not empty
float(@L)
P-Integer
 
int
P-Long Integer
 
bigint
P-Long Real
 
real
P-Multimedia
 
image
P-Numeric
 
numeric(@L,@D)
P-Real
 
real
P-Smallint
 
smallint
P-String
Unicode
ntext
Not Unicode
text
P-Text
Unicode
ntext
Not Unicode
text
P-Time
 
time
P-Timestamp
 
timestamp
P-Tinyint
 
tinyint
P-Varbinary
 
varbinary(@L)
P-Varchar
Not Unicode and L>8000
ntext
Not Unicode and (L=8001 or L ø)
nvarchar(@L)
Not Unicode and L>8000
text
Not Unicode and (L<8001 or L ø)
varchar(@L)
P-Wide Character
 
nchar(@L)
P-Wide String
 
nvarchar(@L)
 
Datatype --> Pivot (SQL Server 2008)
Datatype
Condition
Pivot
bigint
 
P-Long Integer
binary(L)
 
P-Binary
bit
 
P-Boolean
char(L)
 
P-Character
datetime
 
P-Datetime
decimal(L,D)
 
P-Decimal
float
 
P-Float
float(L)
 
P-Float
image
 
P-Multimedia
int
 
P-Integer
money
 
P-Currency
nchar(L)
 
P-Wide Character
numeric(L,D)
 
P-Numeric
nvarchar(L)
 
P-Wide String
real
 
P-Real
smalldatetime
 
P-Date
smallint
 
P-Smallint
smallmoney
 
P-Currency
text
 
P-Text
time
 
P-Time
timestamp
 
P-Timestamp
tinyint
 
P-Tinyint
uniqueidentifier
 
P-AutoIdentifier
varbinary(L)
 
P-Varbinary
varchar(L)
 
P-Varchar