+ Reply to Thread
Results 1 to 2 of 2

inserting from another table

  1. #1
    Registered User
    Join Date
    03-20-2012
    Location
    usa
    MS-Off Ver
    Microsoft 365 MSO Version 2304
    Posts
    39

    Question inserting from another table

    greeetings all. i'm new to access as i'm more of an excel person. anyways i'm using an existing access database from a co-worker where i want to add a table into the main table that is pulling data from 1 other table.

    here's the SQL command:
    SELECT dd.SMT AS TBM, dd.[Cust Name] AS DealerName, dd.City, dd.State, d.Dealer, d.Product,
    d.PIN, d.Description, d.SpendingPeriod, CCUR(IIF(d.Earned='-',0,nz(d.Earned,0))) AS Earned, CCUR(IIF(d.Spent='-',0,nz(d.Spent,0))) AS Spent, CCUR(nz(d.Balance,0)) AS Balance, d.Models, ddd.MaxSpend
    INTO tblMainReport

    FROM qry_Detail AS d

    INNER JOIN tblDlrDump_F0101 AS dd ON d.Dealer = dd.Dealer;

    i'm trying to add a column called "MaxSpend" from a table called tblPrgram and insert it with the other data into tblMainReport (i created a column for MaxSpend). I'm not certain where to and if to add another SELECT command line or add it into the command line with the others?

    thanks for your help!

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,192

    Re: inserting from another table

    use an append query to add data from a table/query
    (use the query wizard)

    also:
    use an update to change existing data in a table
    use a delete query to remove records from a table

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Update table Automatically by inserting into another
    By jmcconville18 in forum Excel General
    Replies: 1
    Last Post: 06-02-2014, 09:50 PM
  2. [SOLVED] Inserting Row at top of table
    By jacob@thepenpoint in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-19-2013, 11:39 AM
  3. Inserting subtotals into a defined table
    By CA_needing_help in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-20-2013, 09:23 AM
  4. Automatically Inserting a new Table Row
    By Trachr in forum Excel General
    Replies: 3
    Last Post: 05-07-2013, 07:46 PM
  5. Inserting a new Column in Pivot Table
    By NM123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2011, 04:54 AM
  6. Inserting rows in a table
    By Pat Jordan in forum Excel General
    Replies: 4
    Last Post: 11-13-2011, 03:46 PM
  7. Inserting table in Excel
    By markwilest in forum Excel General
    Replies: 1
    Last Post: 05-15-2007, 05:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1