Skip to content
Advertisement

SQL `SELECT ‘some string value’ AS fieldname` equivalent in Powershell?

In SQL I can go SELECT actualField, "repeat" AS bs_repeated_value FROM Table1

And I can repeat the bs_repeated_value field as many times as there are rows no matter what I name the field!

Now in a similar and like manner in Powershell I can…almost…do the same thing, except for what I mentioned above…

Is there no way to do this?

Advertisement

Answer

Okay I’m doing this wrong…here is how it works, although it’s a bit less elegant than say your SQL syntax…

References:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement