Results 1 to 3 of 3
  1. #1
    tmcrouse is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    169

    update query with inner join roundup

    I have two tables and I want to do an update query with an inner join to the other but when I update I want to roundup because the datatype in 1 table is (18,2) and the other decimal(18,4). For example in the table that is 18,4, the rate is 0.7982 and when I do an update query to the table that has 18,2, it makes the rate 79.



    I have tried an update query below but not sure how to incorporate the roundup portion

    Code:
    UPDATE table1 INNER JOIN table2 on table1.lob = table2.lob and table1.product = table2.product and table1.state = table2.state 
    SET table1.rate = table2.rate
    where table1.vendor = "JBS";

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Try:
    Code:
    UPDATE table1 INNER JOIN table2 on table1.lob = table2.lob and table1.product = table2.product and table1.state = table2.state 
    SET table1.rate = Round(table2.rate,2)
    where table1.vendor = "JBS";

  3. #3
    tmcrouse is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    169
    Thats the ticket thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Update Query with multiple inner join
    By phineas629 in forum Queries
    Replies: 1
    Last Post: 04-28-2014, 06:56 PM
  2. Update in Simple Join Query
    By drunkenneo in forum Queries
    Replies: 3
    Last Post: 11-21-2013, 11:35 AM
  3. Replies: 3
    Last Post: 11-10-2012, 07:52 AM
  4. Update, join, help
    By toqilula in forum Access
    Replies: 1
    Last Post: 03-17-2012, 02:52 PM
  5. Replies: 3
    Last Post: 12-20-2010, 09:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums