473,387 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Help w/ Update Query

Well seeing as I can't post this to the first part of the Question I just made another Question.

I have an Update SQL and need to take what I have and add to it.
What I wish to do:
1. IIf Max (tB.[Action Type]= 'Sent to EOD'& tB.[Action Date]not Null
THEN tA.[To EOD Date]= Null
But Max tB.[Action Type]='Sent to EOD',tB.[Action Date] must be after Max tB.[Action Type]='New Security Packet',tB.[Action Date]

This is what I have: UPDATE [tblDallas PSU Database] AS tA INNER JOIN [tblAction Log] AS tB ON tA.[Social Security Number]=tB.[Social Security Number] SET
tA.[Intake Delay Date] = IIf(tB.[Action Type]='Delayed',tB.[Action Date],tA.[Intake Delay Date]),
tA.[To EOD Date] = IIf(tB.[Action Type]='Sent to EOD',tB.[Action Date],tA.[To EOD Date]),
tA.[Received Date] = IIf(tB.[Action Type]='New Security Packet',tB.[Action Date],tA.[Received Date]),
tA.[e-QIP Invite Date] = IIf(tB.[Action Type]='E-Qip Initiation',tB.[Action Date],tA.[e-QIP Invite Date])
WHERE (tB.[Action Type] In ('Delayed','Sent to EOD','New Security Packet','E-Qip Initiation'));
Oct 6 '10 #1
0 938

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: bwalke | last post by:
I am trying to update data in a MS Access table with data from a SQL 2000 table connected by linked servers. Here are the update statements: This one Works\\ Update OpenQuery(MII, 'Select *...
4
by: rdraider | last post by:
I am looking for some assistance with an update query that needs to link 3 tables: This query ran and reported over 230,000 records affected but did not change the field I wanted changed, not...
1
by: Kunal | last post by:
Hi, I need some help on writing an update query to update "UnitsSold" field in Products Table whenever I save a transaction. The transaction may contain several "Subtransactions", one for each...
3
by: rrh | last post by:
I am trying to update a field in one table with data from another table. The problem I'm running into is I need to base the update on a range of data in the 2nd table. Table 1 has: date field...
3
by: Clive Moss | last post by:
Anyone able to help? I want to update a specified number of records that match a criteria. If I use an update query it alters all the records that match - I need to alter only a variable number....
10
by: Randy Harris | last post by:
I imported records into a table, later found out that many of them had trailing spaces in one of the fields. If I'd caught it sooner, I could have trimmed the spaces before the import. This...
7
by: Dave Hopper | last post by:
Hi I posted a question recently regarding problems I am having getting a value from a list box to use in a query. I got a lot of help, for which I thank you and it's nearly working! But I need...
7
by: Mark Carlyle via AccessMonster.com | last post by:
I have this update query that I am trying to run. I know the syntax is messed up but do not know how to correct it. Select 'UPDATE', Transactions,'Set = where = ' From "Get Daily Balances" ...
2
by: bobabooey2k | last post by:
I have an update query with one field having in its "Update to" cell a DLookup statement. This query takes 2-3 minutes on 3000 records. Can I avoid dlookup here using multiple queries? An...
2
by: Reedsp | last post by:
OS: MS XP Access version: 2003 SP2 I am trying to use an update query to replace quote marks with nothing. In essence, I'm removing quote marks. I get a error message when a field is empty or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.