A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Update query based on different conditions



 
 
Thread Tools Display Modes
  #1  
Old August 31st, 2004, 10:33 PM
Vincdc
external usenet poster
 
Posts: n/a
Default Update query based on different conditions

Hello:
I have 3 queries and 1 table (ID as primary key). Is there any way that a
update query can deal with 3 conditions and update "Status"?
if a.ID=b.ID, then a.Status="Possible"
if a.ID=c.ID, then a.Status="Probable"
If a.ID=d.ID, then a.Status="Confirmed"
If not, what would be the solution?
Thanks in advance!

  #2  
Old August 31st, 2004, 11:54 PM
MGFoster
external usenet poster
 
Posts: n/a
Default

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Looks like 3 UPDATEs are required:

UPDATE a INNER JOIN b ON a.ID = b.ID
SET a.Status = 'Possible'

UPDATE a INNER JOIN c ON a.ID = c.ID
SET a.Status = 'Probable'

UPDATE a INNER JOIN d ON a.ID = d.ID
SET a.Status = 'Confirmed'

--
MGFoster:::mgf00 at earthlink decimal-point net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQTUBjoechKqOuFEgEQIHsACfT0w9X/mq5Scf+YJRypMMLnKZUP0AniOJ
3hyPXK5iER+xOc0kGjB3jw0w
=MHl9
-----END PGP SIGNATURE-----


Vincdc wrote:

Hello:
I have 3 queries and 1 table (ID as primary key). Is there any way that a
update query can deal with 3 conditions and update "Status"?
if a.ID=b.ID, then a.Status="Possible"
if a.ID=c.ID, then a.Status="Probable"
If a.ID=d.ID, then a.Status="Confirmed"
If not, what would be the solution?
Thanks in advance!


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Taher Setting Up & Running Reports 1 August 31st, 2004 09:07 PM
Update a query to value in another table Tim Running & Setting Up Queries 1 August 13th, 2004 11:35 PM
EXISTS reserved word in FROM clause Stephanie Doherty Running & Setting Up Queries 6 July 21st, 2004 01:15 AM
Update Query Type Conversion Failure Running & Setting Up Queries 2 July 7th, 2004 06:52 PM
Update Query Problem Casa General Discussion 1 June 14th, 2004 04:17 PM


All times are GMT +1. The time now is 08:12 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.