SSIS Zero Questions

I have a table with 5 string columns, all can be NULL. After I read the data from this table, I want to convert any empty values ​​to empty rows. The reason is that I need to compare these columns with columns in another table of the same schema (using conditional split), and null values ​​will cause the comparison to be evaluated to NULL.

Is there any functionality in SSIS that allows me to convert NULL to empty strings or just not have to deal with NULL at all?

+3
source share
4 answers

Derived Column. VS, - :

IIF(ISNULL(column)?"":column)

.


UPDATE. , IIF .

ISNULL(column)?"":column
+4

(ISNULL ()? "": column) IIF

+8

In your query, wrap your columns as follows:

SELECT ISNULL(col1,'') AS [col1]
      ,ISNULL(col2,'') AS [col2]
      ,ISNULL(col3,'') AS [col3]
      ,ISNULL(col4,'') AS [col4]
      ,ISNULL(col5,'') AS [col5]
+2
source

In your request you can use this as

CASE Tablename.ColumnName WHEN NULL THEN ' ' ELSE Tablename.ColumnName END AS 'Column Name'
0
source

Source: https://habr.com/ru/post/1712231/


All Articles