question

ewinkiser avatar image
0 Votes"
ewinkiser asked ewinkiser commented

If Middle Initial is missing, how can you convert a null to a Space in ADF or Stored Proc?

Hi @nasreen-akter @MartinJaffer-MSFT @KranthiPakala-MSFT

We have a requirement that if the Middle Initial or Middle Name is Null in the SQL DB Table, convert it to a blank character '' to hold the spacing in a custom formatted file. Any ideas how to do this?

MiddleName
NULL

Thanks!
Mike Kiser

azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NandanHegde-7720 avatar image
0 Votes"
NandanHegde-7720 answered ewinkiser commented

Hey,
You can use coalesce function.
https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/coalescefunction

somewhat like the below:
@coalesce(COl1,'')


or you can use ISNULL(Col1,'') in your select statement within SQL source

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@NandanHegde-7720

Thanks! That worked!!!
Mike Kiser

0 Votes 0 ·