This is my current statement. It does not work. It returns 0 results.
SELECT ID,ACCOUNT,Key,MasterKey, key FROM Asset
WHERE MasterKey = $parent_key And Asset = $asset
If I change this statement to hardcoded values:
SELECT ID,ACCOUNT,Key,MasterKey, key FROM Asset
WHERE MasterKey = '1234' And Asset = 'Test'
It works.
The variables are being filled using an IBM tool, Castiron. I'm not sure if I need to consult that group, or just simply add the single quotes around the variable values.
Something like this:
SELECT ID,ACCOUNT,Key,MasterKey, key FROM Asset
WHERE MasterKey = '''' + $parent_key + '''' And Asset = '''' + $asset + ''''
Any thoughts?
Try this..Use single quotes for the variables