SqlFunctions.Sign Method

Definition

Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.

Overloads

Sign(Nullable<Decimal>)

Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.

Sign(Nullable<Double>)

Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.

Sign(Nullable<Int32>)

Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.

Sign(Nullable<Int64>)

Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see SIGN (Transact-SQL).

Sign(Nullable<Decimal>)

Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.

public:
 static Nullable<System::Decimal> Sign(Nullable<System::Decimal> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "SIGN")]
public static decimal? Sign (decimal? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "SIGN")>]
static member Sign : Nullable<decimal> -> Nullable<decimal>
Public Shared Function Sign (arg As Nullable(Of Decimal)) As Nullable(Of Decimal)

Parameters

arg
Nullable<Decimal>

A numeric expression.

Returns

The sign of the input expression.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see SIGN (Transact-SQL).

Applies to

Sign(Nullable<Double>)

Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.

public:
 static Nullable<double> Sign(Nullable<double> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "SIGN")]
public static double? Sign (double? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "SIGN")>]
static member Sign : Nullable<double> -> Nullable<double>
Public Shared Function Sign (arg As Nullable(Of Double)) As Nullable(Of Double)

Parameters

arg
Nullable<Double>

A numeric expression.

Returns

The sign of the input expression.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see SIGN (Transact-SQL).

Applies to

Sign(Nullable<Int32>)

Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.

public:
 static Nullable<int> Sign(Nullable<int> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "SIGN")]
public static int? Sign (int? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "SIGN")>]
static member Sign : Nullable<int> -> Nullable<int>
Public Shared Function Sign (arg As Nullable(Of Integer)) As Nullable(Of Integer)

Parameters

arg
Nullable<Int32>

A numeric expression.

Returns

The sign of the input expression.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see SIGN (Transact-SQL).

Applies to

Sign(Nullable<Int64>)

Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.

public:
 static Nullable<long> Sign(Nullable<long> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "SIGN")]
public static long? Sign (long? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "SIGN")>]
static member Sign : Nullable<int64> -> Nullable<int64>
Public Shared Function Sign (arg As Nullable(Of Long)) As Nullable(Of Long)

Parameters

arg
Nullable<Int64>

A numeric expression.

Returns

The sign of the input expression.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see SIGN (Transact-SQL).

Applies to