mwhodges
asked on
Need help with a sql view
I am using the following query:
SELECT a.pkNewTargetID, a.ProductClass, a.Product_ProductServiceNa me
FROM Target AS a LEFT OUTER JOIN
TargetReference AS b ON a.Product_ProductServiceNa me = b.ProductServiceName amd b.fk_PlanID='30'
WHERE (b.ProductServiceName IS NULL) AND (a.Letter = 'Y')
This query is intended to show all records from target that are not in TargetReference that are assigned to that paticular fk_PlanID. I can get the query to work in design view however when I put it into a view I cannot populate that '30' using a linqdatasource. Please help.
SELECT a.pkNewTargetID, a.ProductClass, a.Product_ProductServiceNa
FROM Target AS a LEFT OUTER JOIN
TargetReference AS b ON a.Product_ProductServiceNa
WHERE (b.ProductServiceName IS NULL) AND (a.Letter = 'Y')
This query is intended to show all records from target that are not in TargetReference that are assigned to that paticular fk_PlanID. I can get the query to work in design view however when I put it into a view I cannot populate that '30' using a linqdatasource. Please help.
ASKER
Yes sorry. I made the correction after I posted.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
typo, amd should be AND
>b.fk_PlanID='30'
should this be a.fk_PlanID?