I’m attempting to define a $queryString to be used against an Oracle database. I also need to be able to concatenate some of the query with the || operator. The problem I believe is that Powershell sees this as the Pipeline operator. I’ve also tried using the escape in the form of both \| and ”| but neither seem to work. for reference, here is the query I am using.
$queryString = 'select v.npa || v.calling_number phone_number, v.location, v.customer_name '
$queryString += 'from voip_validate v '
$queryString += 'left outer join phone_numbers p '
$queryString += 'on v.npa || v.calling_number = p.area_code || p.phone_prefix || p.phone_suffix '
$queryString += 'left outer join mv_dps_buildings b '
$queryString += 'on b.dps_building_number = p.dps_building_number '
$queryString += 'where p.area_code is null '
$queryString += 'and p.phone_prefix is null '
$queryString += 'and p.phone_suffix is null; '
use
here-string(http://technet.microsoft.com/en-us/library/ee692792.aspx) :