Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Troubles with update

Status
Not open for further replies.

LionSkyWalker

Programmer
Joined
May 9, 2001
Messages
8
Location
MX
Hi there.

I'm having troubles with some updates, but here is the first:

How can I update a Field, that get the value from a Count statement between 2 tables? Here's what I'm trying to do:


Update TableX Set Field1 = (
SELECT Count(*) FROM Table1 INNER JOIN Table2 ON Table1.ses_id = Table2.ses_id WHERE Table1.status In ('E','A'))

I hope someone could help me...
 
Hiya,

Why don't you try:

SELECT tempField1 = SELECT Count(*) FROM Table1 INNER JOIN Table2 ON Table1.ses_id = Table2.ses_id WHERE Table1.status In ('E','A'))


Update TableX Set Field1 = tempField1


Tim
 
That update works fine in SQL, but does not in Access. In access just says that it must use a query updatable...

Or how can I do it in a Form in access instead than a query???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top