Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 update query with self join not executing in acces

Author  Topic 

milena
Starting Member

16 Posts

Posted - 2009-01-26 : 13:00:45
Hi guys,

spend an afternoon doing this and thought I can get some help.
Ok I have a table HeaderTable where I have a field called HeaderInfo.
The HeaderInfo field is a string type and I use that field to trim a ReportingPeriod from it .Then for each row in that table with the result from the first query I would like to populate another field in the same table HeaderTable .
I use the following query to do so:

UPDATE HeaderTable
INNER JOIN HeaderTable AS HeaderTable_1
ON HeaderTable.ID = HeaderTable_1.ID
SET HeaderTable.ReportingPeriod = (select mid(HeaderInfo,39,8) from HeaderTable);

It looks ok to me but whenever I click the update button it doesn`t seem to do anything it just displays the query`s design view.
The ID field in the table is a primary key.
Tried removing the Primary key and ran the query again, still no help


Will appreciate any help
tHANKS IN ADVANCE

   

- Advertisement -