I have the following table:
ID|Name |FruitOrder
1 |Sarah|Apple, Banana, Orange, Peach, Mangoes
2 |John |Apple, Banana
3 |Mary |Peach, Mangoes
4 |Mark |Mangoes
I want to take the returned sql table dataset, and append a new column called "note" to the dataset, filling each row with the string "Query1" (for simplicity) :
ID|Name |FruitOrder | Note
1 |Sarah|Apple, Banana, Orange, Peach, Mangoes | Query1
2 |John |Apple, Banana | Query1
3 |Mary |Peach, Mangoes | Query1
4 |Mark |Mangoes | Query1
Powershell Code, please see foreach for suggestion.
#powershell code
$SQLDataset = New-Object System.Data.DataSet
$SqlAdapter.fill($SQLDataset) | out-null
foreach ($object in SQLDataset.tables){
# suggestion for logic/code please
}