Can't update in ADO

A

Allen_N

I can't seem to get an update to work in an Access Project. It seems that ADO
doesn't support the UPDATE statement. So, I tried building a stored procedure
(using INSERT INTO) as shown in Help, but it does not alter any rows.

Here is the SQL:

INSERT INTO dbo.SuperssnInd (IND)
SELECT IND
FROM dbo.SuperssnInd
WHERE (ITEM = PARENT) AND (IND <> 'S')

I want to set IND to 'S' when ITEM = PARENT. The above code doesn't look
right to me, but the SQL Grid and Help are pretty useless in this situation.

Thanks!
 
R

Robert Morley

Your syntax for an INSERT is correct, I think, but I believe what you're
looking for is an UPDATE instead of an INSERT. Try:

UPDATE dbo.SuperssnInd
SET IND = 'S'
WHERE (ITEM = PARENT) AND (IND <> 'S')


Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top