Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Create Single Text File with Variables from CSV File

$
0
0

I am needing to create a single text file that has 1251 occurrences of the following:

DECLARE @return_value int

EXEC   

@returnvalue = [dbo].[sproc_x_y_z]

@providerassetid = N'$asset',

@providerid = N'xyz',

@serviceCollectionId = NULL

SELECT    'Return Value' = @return_value

 

The $asset is a unique value contained in a separate CSV file that has 1251 different values.  I am very new to powershell and am not sure how to create a file that outputs the above text and then insert the variable from the CSV file.


Viewing all articles
Browse latest Browse all 8583

Trending Articles