I'm trying to get my PowerShell select statement correct, I can get the correct response with the SWQL, but it does not work for me in the PS script. I'm sure it's easy, but not sure what I'm missing.
SQL statement that works in SWQL Studio is:
SELECT DefinitionID, ContainerID, Expression, Definition
FROM Orion.ContainerMemberDefinition
WHERE ContainerID='23' AND Expression LIKE '%362'
Result 140
In PowerShell
$MemberPrimaryID = '362'
$ContainerID = '23'
$definitionID = get-swissdata $swis 'SELECT definitionID from Orion.ContainMemberDefinition Where ContainerID='$ContainerID' AND 'Definition' LIKE '%$MemberPrimaryID'"
It runs with no issues, but it does not return a valid value. With the SQL statement I get 140 as the result with PowerShell I get nothing..