bcp_gettypename

Returns the SQL type name for a specified BCP type token.

구문

RETCODE bcp_gettypename (
        INT token,
        DBBOOL fIsMaxType);

Arguments

  • token
    A value indicating a BCP type token.
  • field
    Indicates if token requested is a max type.

Returns

A string containing the SQL type name corresponding to the BCP type. If an invalid BCP type is specified, an empty string is returned..

주의

The BCP type tokens are defined in the sqlncli.h header file and the sqlncli.lib library.

The table below specifies the possible BCP types, whether or not they are max types, and the expected output.

BCP type name MaxType Output

SQLDECIMAL

Either

decimal

SQLNUMERIC

Either

numeric

SQLINT1

Either

tinyint

SQLINT2

Either

smallint

SQLINT4

Either

int

SQLMONEY

Either

money

SQLFLT8

Either

float

SQLDATETIME

Either

datetime

SQLBITN

Either

bit-null

SQLBIT

Either

bit

SQLBIGCHAR

No

char

SQLCHARACTER

No

char

SQLBIGVARCHAR

No

varchar

SQLVARCHAR

No

varchar

SQLTEXT

Either

text

SQLBIGBINARY

No

binary

SQLBINARY

No

binary

SQLBIGVARBINARY

No

varbinary

SQLVARBINARY

No

varbinary

SQLIMAGE

Either

image

SQLINTN

Either

int-null

SQLDATETIMN

Either

datetime-null

SQLMONEYN

Either

money-null

SQLFLTN

Either

float-null

SQLAOPSUM

Either

sum

SQLAOPAVG

Either

avg

SQLAOPCNT

Either

count

SQLAOPMIN

Either

min

SQLAOPMAX

Either

max

SQLDATETIM4

Either

smalldatetime

SQLMONEY4

Either

smallmoney

SQLFLT4

Either

real

SQLUNIQUEID

Either

uniqueidentifier

SQLNCHAR

No

nchar

SQLNVARCHAR

No

nvarchar

SQLNTEXT

Either

ntext

SQLVARIANT

Either

sql_variant

SQLINT8

Either

bigint

SQLCHARACTER

Yes

varchar(max)

SQLBIGCHAR

Yes

varchar(max)

SQLBIGVARCHAR

Yes

varchar(max)

SQLVARCHAR

Yes

varchar(max)

SQLBINARY

Yes

varbinary(max)

SQLBIGBINARY

Yes

varbinary(max)

SQLBIGVARBINARY

Yes

varbinary(max)

SQLVARBINARY

Yes

varbinary(max)

SQLNCHAR

Yes

nvarchar(max)

SQLNVARCHAR

Yes

nvarchar(max)

SQLXML

Yes

xml

SQLUDT

Either

udt

참고 항목

참조

Bulk Copy Functions

도움말 및 정보

SQL Server 2005 지원 받기