troubleshooting Question

how to delete the data return from this query

Avatar of jsctechy
jsctechyFlag for United States of America asked on
Microsoft SQL Server 2005
4 Comments1 Solution249 ViewsLast Modified:
hi there,
if i put this query in access 2003 it will delete the data but i need to write it in a store procedure and call in from code. how can i make it work?

DELETE
FROM CUSTNEW LEFT JOIN NADD ON CUSTNEW.ACCT_P = NADD.ACCT_P
WHERE (((NADD.ACCT_P) Is Not Null));

the way it is right now it gives me this error:
"Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'LEFT'.
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near 'NADD'."

any suggestions?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros