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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update / Append to a "Dump" table

Status
Not open for further replies.

end922

Technical User
Apr 17, 2007
59
US
Greetings,

My goal is to take and append/updated loan numbers into a dump table that meet certain criteria. The dump table contains headers "Application Date Null", "Underwriting Received Date Null"....and many more.
During the validation process I have queries that check for these errors (null values). Once identified I want the ability to update / append the loan number to the appropiate column in the dump table.

I currently get to this point with append queries.
Application Date Null Underwriting Date Null
123
456
123
789
666
454
321

I would like to get to this point.
Application Date Null Underwriting Date Null
123 123
456 789
666
454
321


Any suggestions would be greatly appreciated.

Thanks
E

(sorry for the poor paste not sure of the tag to format a table)
 
Use UPDATE instead of INSERT when appropriate.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Code:
INSERT INTO [Exception Loan Data] ( UWrecAsgn )
SELECT Exceptions.UWrecAsgn
FROM Exceptions
WHERE (((Exceptions.UWrecAsgn)>"1"));

I am playing around with update queries but the issue I am having is that I don't have a join between the 2 tables. Still working on it.

 
well you can do a blanket insert on the first part "Application Date Null", but then you'll need to do a check to see if the "Underwriting Date Null" value needs to be an INSERT or an UPDATE. So in psuedo code:

Code:
INSERT all IDs that have Application Date Null

for all IDs that have Underwriting Date Null
  if ID already exists in Application Date Null
     UPDATE TempTable SET  Underwriting Date Null = ID WHERE Application Date Null = ID
  else
     INSERT INTO TempTable Underwriting Date Null ID

Leslie

Have you met Hardy Heron?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top