I have a loop statement in powershell, and it's give me error. I think that "+$Row2+" as 'col 2' is not right.anyone could help? Thanks so much[quote]foreach($Row in $DataSet.Tables[0].Rows){ $Row1 $Row2= $Row[0] $Row3= $Row[1] $Row4= $Row[2] $Row5= $Row[3] $Query_grab = " use "+$Row2+" select * from ( select '12' as 'col 1' "+$Row2+" as 'col 2' from table a left outer join table b on a.id = b.id group by b.groupname ) as x"[/quote]
↧