Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Technical Reference
 NULL (SSIS Expressions)

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
Other versions are also available for the following:
SQL Server 2008 Books Online (June 2009)
NULL (SSIS Expressions)

Returns a null value of a requested data type.

NULL(typespec)
typespec

Is a valid data type. For more information, see Integration Services Data Types.

Any valid data type with a null value.

NULL returns a null result if the argument is null.

Parameters are required to request a null value for some data types. The following table lists these data types and their parameters.

Data type Parameter Example

DT_STR

charcount

codepage

(DT_STR,30,1252) casts 30 characters to the DT_STR data type using the 1252 code page.

DT_WSTR

charcount

(DT_WSTR,20) casts 20 characters to the DT_WSTR data type.

DT_BYTES

bytecount

(DT_BYTES,50) casts 50 bytes to the DT_BYTES data type.

DT_DECIMAL

scale

(DT_DECIMAL,2) casts a numeric value to the DT_DECIMAL data type using a scale of 2.

DT_NUMERIC

precision

scale

(DT_NUMERIC,10,3) casts a numeric value to the DT_NUMERIC data type using a precision of 10 and a scale of 3.

DT_TEXT

codepage

(DT_TEXT,1252) casts a value to the DT_TEXT data type using the 1252 code page.

These examples return the null value of the data types: DT_STR, DT_DATE, and DT_BOOL.

NULL(DT_STR,10,1252)
NULL(DT_DATE)
NULL(DT_BOOL)
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker