-
Update query
Hi,
Can anyone tell if the following update query looks just about right?
UPDATE [AC Case] SET [AC Case].Magistrate_ID = 6
WHERE [AC Case].[Case_ID]=22 And [AC Case].[Case_ID]=23;
The table name is AC Case
The field that I want to update is called Magistrate_ID
And I just want to update the magistrate_ID in cases 22 and 23.
Cheers
Andy
-
Re: Update query
I think you want to say OR rather than AND in the WHERE clause. The Case_ID
field in a record can't be both 22 and 23 at the same time.
"Andy" <andrew.constable@ntlworld.com> wrote:
>
>Hi,
>Can anyone tell if the following update query looks just about right?
>
>UPDATE [AC Case] SET [AC Case].Magistrate_ID = 6
>WHERE [AC Case].[Case_ID]=22 And [AC Case].[Case_ID]=23;
>
>The table name is AC Case
>The field that I want to update is called Magistrate_ID
>And I just want to update the magistrate_ID in cases 22 and 23.
>
>Cheers
>Andy
>
-
Re: Update query
Looks good Andy.. try this
UPDATE [AC Case]
SET [AC Case].Magistrate_ID = 6
WHERE [AC Case].[Case_ID] in (22,23)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|