GOAL : an export to csv showing from a SQL table ; showing me the NULL value in column/row if it’s present. eg. |1|“hello”|NULL|1.28
- I fill up a datatable with a SQL query
- First I tried export-csv ; but null values are seen as empty text… it’s not really the same
- Next idea was ; let me create an export-csv myself ; I iterate for each row and each column checking if there is a DBNULL value present (row[col] -eq [System.DBNULL]::value)
… unfortunately I loose all speed here when doing this. For 165000 rows (15 cols) ; It takes up to 15 minutes.
It now works… but too slow, especially if it needs to size for bigger tables.
Maybe I started off on the wrong foot? somebody a better idea or ?
Any help appreciated