Link to home
Start Free TrialLog in
Avatar of mwhodges
mwhodgesFlag for United States of America

asked on

Need help with a sql view

I am using the following query:

SELECT        a.pkNewTargetID, a.ProductClass, a.Product_ProductServiceName
FROM            Target AS a LEFT OUTER JOIN
                         TargetReference AS b ON a.Product_ProductServiceName = 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.
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

>b.ProductServiceName amd b.fk_PlanID='30'
typo, amd should be AND

>b.fk_PlanID='30'
should this be a.fk_PlanID?
Avatar of mwhodges

ASKER

Yes sorry.  I made the correction after I posted.
ASKER CERTIFIED SOLUTION
Avatar of Mlanda T
Mlanda T
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial