Ask a Question related to Databases, Design and Development.
-
the_penfool #1
access - Update with nested select query
Hi guys, will be brief cuz im stressed.this is access DB btw
whats wrong with this update statement
select statement work well on its own.
design to update any records in accounts table with no date of issues after 2007 in mailing table. tells me only 1 record can be returned, if I use exist I get all records.THANKS
UPDATE [Tbl Mailing Details] SET Lapsed = 1
WHERE (SELECT [Tbl Quote Information].[Mailing ID]
FROM [Tbl Quote Information] INNER JOIN [Tbl Mailing Details] ON [Tbl Quote Information].[Mailing ID] = [Tbl Mailing Details].[Mailing ID]
GROUP BY [Tbl Quote Information].[Mailing ID]
HAVING (((Max([Tbl Quote Information].[Date of Issue]))<#9/1/2007#)));Last edited by the_penfool; May 12th at 02:16 PM. Reason: access db
Junior Member
- Join Date
- May 2011
- Posts
- 2
-
update and insert query error, but select works ok.
:rose; Any ideas spring to mind about the following issue? I'm getting an error trying to run an Update or Insert query. I can run a Select... -
SQL: nested select vs. two selects
I have two tables. Items and ItemCategories. I want to pull up a list of all items that have a specific itemCateogryID from the Items table. I... -
Union or Join or Nested Select - Can't Remember
Its been along time since I have had to write tsql from the hip so any help would be greatly valued. I have a table that contains Country, State,... -
trying to update a table after making a join select query on two tables
here is my problem distilled down I need to be able to change the title of a book associated with an author there are 2 tables "author" and "books"... -
Use a SELECT @@IDENTITY as a sub-query in an UPDATE ?
It didn't work. UPDATE tblBlogs SET link_ID = blog_ID WHERE blog_ID = @@IDENTITY I get this error when trying to save an Access query: ... -
the_penfool #2
Re: access - Update with nested select query
may have fixed it by adding IN....
UPDATE [Tbl Mailing Details] SET Lapsed = 1
WHERE [Mailing ID] IN (SELECT [Tbl Quote Information].[Mailing ID]
FROM [Tbl Quote Information] INNER JOIN [Tbl Mailing Details] ON [Tbl Quote Information].[Mailing ID] = [Tbl Mailing Details].[Mailing ID]
GROUP BY [Tbl Quote Information].[Mailing ID]
HAVING (((Max([Tbl Quote Information].[Date of Issue]))<#9/1/2007#)));
Junior Member
- Join Date
- May 2011
- Posts
- 2
-
Ashish Singhal #3
Re: access - Update with nested select query
You need to put some condition in where clause like as you are fetching mailid from other tables then u can match mailid and put the condition like WHERE mailid in (SELECT....
Junior Member
- Join Date
- Sep 2011
- Posts
- 3
-
shanonfields #4
access - Update with nested select query
Need a vehicle list that’s clean, simple and won’t cost you (or your client) hundreds of dollars to buy and maintain? Our ‘Full Size’ model is robust and highly functional, but doesn’t have the excessive number of fields that many users don’t want or need.
year make model database
Junior Member
- Join Date
- Mar 2012
- Location
- USA
- Posts
- 1



Reply With Quote

