| | |
|
|
|
MSDE SQL Update Stored Procedure Syntax |
| message from Admin on 10 May 2004 |
I have 2 tables, table A and B. Table A has the following fields; Phone
(nvchar), Fname (nvchar), Lname (nvchar), DNC (bit). Table B has one field
PhoneNo (nvchar). I would like to update the field DNC to True if the values
Phone in Table A = PhoneNo in Table B.
I tried this syntax but it never updated:
UPDATE dbo.A
SET DNC = 1
WHERE (Phone = 'SELECT MAX dbo.B.PhoneNo FROM dbo.B')
These tables have over 100K records and I would like to make sure it runs
thru and checks every single record not just the first 10000
|
| Dirk Goldgar replied to Admin on 10 May 2004 |
"Admin" <rwjinc@cfl.rr.com> wrote in message
news:DoTnc.16181$2f6.632658@twister.tampabay.rr.com
I'm not sure I understand, because your text description of what you
want to accomplish and your SQL don't seem to correspond. From your
description, I'd have thought you would be using something like this:
UPDATE dbo.A
SET DNC = 1
FROM dbo.A INNER JOIN dbo.B ON dbo.A.Phone = dbo.B.PhoneNo
|
|
Archived message: MSDE SQL Update Stored Procedure Syntax (Microsoft Access Error Message)