I'm trying to learn how to make and use aliases for two tables in in
this update statement:
ALTER PROCEDURE dbo.UpdateStatu s
AS UPDATE dbo.npfields
SET Status = N'DROPPED'
FROM dbo.npfields NPF, dbo.importparse d IMP
LEFT JOIN IMP
ON (NPF.pkey = IMP.pkey)
WHERE (IMP.pkey IS NULL) AND
((NPF.Status = N'ERR1') OR (NPF.Status = N'ERR2') OR (NPF.Status =
N'ERR3'))
I thought I could define the aliases in the FROM statement.
I'm using Access as a front end to SQL server if that makes a
difference in the queries.
this update statement:
ALTER PROCEDURE dbo.UpdateStatu s
AS UPDATE dbo.npfields
SET Status = N'DROPPED'
FROM dbo.npfields NPF, dbo.importparse d IMP
LEFT JOIN IMP
ON (NPF.pkey = IMP.pkey)
WHERE (IMP.pkey IS NULL) AND
((NPF.Status = N'ERR1') OR (NPF.Status = N'ERR2') OR (NPF.Status =
N'ERR3'))
I thought I could define the aliases in the FROM statement.
I'm using Access as a front end to SQL server if that makes a
difference in the queries.
Comment