Thanks for the solution Flowering Weeds! And thanks for introducing me to
Log Parser. This is the second data parsing solution you've given me with the
Log Parser tool. It's a great tool and I'm trying to get famiiar with it.
"Flowering Weeds" wrote:
Quote:
> Quote:
> >
> > Can someone please help me
> > get the following done in Powershell:
> >
> > I'v got this in a csv file (RefVal.csv):
>
> Mmm data parsing!
>
> Perhaps do it the same way one
> would do this in almost any Windows
> process - by using a data parsing tool.
>
> Here using the automation tool
> powershell.exe
> _automating_ a data parsing tool
> logparser.exe:
>
> $headers = LogParser "SELECT text
> FROM RefValContent.csv
> WHERE index = 1" `
> -i textline -q on
>
> " "
> LogParser.exe "SELECT $headers
> FROM RefValContent.csv
> WHERE RefValC IN
> (Select RefVal FROM RefVal.csv) " `
> -i csv -stats off
>
> " "
> "Done!"
> " "
> Exit
>
> Returns:
>
> RefValC Col1 Col2
> ------- ------------ ------------
> 1 Col1Content1 Col2Content1
> 2 Col1Content2 Col2Content2
> 3 Col1Content3 Col2Content3
> 5 Col1Content5 Col2Content5
> 7 Col1Content7 Col2Content7
> 9 Col1Content9 Col2Content9
>
> Done!
>
> Have some fun
> data parsing,
> plus charting,
> and report making,
> all by using Log Parser!
>
>
>