SqlFunctions.CharIndex 方法

定义

返回在另一个表达式中找到的一个表达式的起始位置。

重载

名称 说明
CharIndex(String, String, Nullable<Int64>)

返回在另一个表达式中找到的一个表达式的起始位置。

CharIndex(Byte[], Byte[], Nullable<Int64>)

返回在另一个表达式中找到的一个表达式的起始位置。

CharIndex(String, String, Nullable<Int32>)

返回在另一个表达式中找到的一个表达式的起始位置。

CharIndex(String, String)

返回在另一个表达式中找到的一个表达式的起始位置。

CharIndex(Byte[], Byte[])

返回在另一个表达式中找到的一个表达式的起始位置。

CharIndex(Byte[], Byte[], Nullable<Int32>)

返回在另一个表达式中找到的一个表达式的起始位置。

注解

不能直接调用此函数。 此函数只能在 LINQ to Entities 查询中显示。

此函数将转换为数据库中的相应函数。 有关相应SQL Server函数的信息,请参阅 CHARINDEX (Transact-SQL)

CharIndex(String, String, Nullable<Int64>)

返回在另一个表达式中找到的一个表达式的起始位置。

public:
 static Nullable<long> CharIndex(System::String ^ toSearch, System::String ^ target, Nullable<long> startLocation);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")]
public static long? CharIndex(string toSearch, string target, long? startLocation);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")>]
static member CharIndex : string * string * Nullable<int64> -> Nullable<int64>
Public Shared Function CharIndex (toSearch As String, target As String, startLocation As Nullable(Of Long)) As Nullable(Of Long)

参数

toSearch
String

要搜索的字符串表达式。

target
String

要找到的字符串表达式。

startLocation
Nullable<Int64>

搜索开始位置的 toSearch 字符位置。

返回

一个值,该值是位于 /a0> 中的起始位置

属性

注解

不能直接调用此函数。 此函数只能在 LINQ to Entities 查询中显示。

此函数将转换为数据库中的相应函数。 有关相应SQL Server函数的信息,请参阅 CHARINDEX (Transact-SQL)

适用于

CharIndex(Byte[], Byte[], Nullable<Int64>)

返回在另一个表达式中找到的一个表达式的起始位置。

public:
 static Nullable<long> CharIndex(cli::array <System::Byte> ^ toSearch, cli::array <System::Byte> ^ target, Nullable<long> startLocation);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")]
public static long? CharIndex(byte[] toSearch, byte[] target, long? startLocation);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")>]
static member CharIndex : byte[] * byte[] * Nullable<int64> -> Nullable<int64>
Public Shared Function CharIndex (toSearch As Byte(), target As Byte(), startLocation As Nullable(Of Long)) As Nullable(Of Long)

参数

toSearch
Byte[]

要搜索的字符串表达式。

target
Byte[]

要找到的字符串表达式。

startLocation
Nullable<Int64>

搜索开始的 toSearch 字符位置。

返回

如果找到target它的起始位置toSearch

属性

注解

不能直接调用此函数。 此函数只能在 LINQ to Entities 查询中显示。

此函数将转换为数据库中的相应函数。 有关相应SQL Server函数的信息,请参阅 CHARINDEX (Transact-SQL)

适用于

CharIndex(String, String, Nullable<Int32>)

返回在另一个表达式中找到的一个表达式的起始位置。

public:
 static Nullable<int> CharIndex(System::String ^ toSearch, System::String ^ target, Nullable<int> startLocation);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")]
public static int? CharIndex(string toSearch, string target, int? startLocation);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")>]
static member CharIndex : string * string * Nullable<int> -> Nullable<int>
Public Shared Function CharIndex (toSearch As String, target As String, startLocation As Nullable(Of Integer)) As Nullable(Of Integer)

参数

toSearch
String

要搜索的字符串表达式。

target
String

要找到的字符串表达式。

startLocation
Nullable<Int32>

搜索开始位置的 toSearch 字符位置。

返回

如果找到target它的起始位置toSearch

属性

注解

不能直接调用此函数。 此函数只能在 LINQ to Entities 查询中显示。

此函数将转换为数据库中的相应函数。 有关相应SQL Server函数的信息,请参阅 CHARINDEX (Transact-SQL)

适用于

CharIndex(String, String)

返回在另一个表达式中找到的一个表达式的起始位置。

public:
 static Nullable<int> CharIndex(System::String ^ toSearch, System::String ^ target);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")]
public static int? CharIndex(string toSearch, string target);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")>]
static member CharIndex : string * string -> Nullable<int>
Public Shared Function CharIndex (toSearch As String, target As String) As Nullable(Of Integer)

参数

toSearch
String

要搜索的字符串表达式。

target
String

要找到的字符串表达式。

返回

如果找到target它的起始位置toSearch

属性

注解

不能直接调用此函数。 此函数只能在 LINQ to Entities 查询中显示。

此函数将转换为数据库中的相应函数。 有关相应SQL Server函数的信息,请参阅 CHARINDEX (Transact-SQL)

适用于

CharIndex(Byte[], Byte[])

返回在另一个表达式中找到的一个表达式的起始位置。

public:
 static Nullable<int> CharIndex(cli::array <System::Byte> ^ toSearch, cli::array <System::Byte> ^ target);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")]
public static int? CharIndex(byte[] toSearch, byte[] target);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")>]
static member CharIndex : byte[] * byte[] -> Nullable<int>
Public Shared Function CharIndex (toSearch As Byte(), target As Byte()) As Nullable(Of Integer)

参数

toSearch
Byte[]

要搜索的字符串表达式。

target
Byte[]

要找到的字符串表达式。

返回

如果找到target它的起始位置toSearch

属性

注解

不能直接调用此函数。 此函数只能在 LINQ to Entities 查询中显示。

此函数将转换为数据库中的相应函数。 有关相应SQL Server函数的信息,请参阅 CHARINDEX (Transact-SQL)

适用于

CharIndex(Byte[], Byte[], Nullable<Int32>)

返回在另一个表达式中找到的一个表达式的起始位置。

public:
 static Nullable<int> CharIndex(cli::array <System::Byte> ^ toSearch, cli::array <System::Byte> ^ target, Nullable<int> startLocation);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")]
public static int? CharIndex(byte[] toSearch, byte[] target, int? startLocation);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CHARINDEX")>]
static member CharIndex : byte[] * byte[] * Nullable<int> -> Nullable<int>
Public Shared Function CharIndex (toSearch As Byte(), target As Byte(), startLocation As Nullable(Of Integer)) As Nullable(Of Integer)

参数

toSearch
Byte[]

要搜索的字符串表达式。

target
Byte[]

要找到的字符串表达式。

startLocation
Nullable<Int32>

搜索开始位置的 toSearch 字符位置。

返回

如果找到target它的起始位置toSearch

属性

注解

不能直接调用此函数。 此函数只能在 LINQ to Entities 查询中显示。

此函数将转换为数据库中的相应函数。 有关相应SQL Server函数的信息,请参阅 CHARINDEX (Transact-SQL)

适用于