if data is not available column header should print in output file in powershell
if (-not $DataSet.Tables[0].Rows[0]) {
($DataSet.Tables[0].Columns | Select-Object -ExpandProperty ColumnName) -join ',' |
Set-Content -Path "E:\Users\neerajd\Documents\tethystrader-public-dev-general\src\SQL\Misc\out.csv"
}
Are there any code examples left?
New code examples in category Shell/Bash