Results 1 to 5 of 5
  1. #1
    squaredev1 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    3

    Help with a New Data Query


    i'm needing a Query that grabs the lastest "newest" data from generated from the query Below and Display them in a result from another query or places the Newest data into the Historical table

    SELECT FloatTable.DateAndTime, FloatTable.TagIndex AS FloatTable_TagIndex, FloatTable.Val, TagTable.TagName, TagTable.TagIndex AS TagTable_TagIndex
    FROM FloatTable INNER JOIN TagTable ON FloatTable.[TagIndex] = TagTable.[TagIndex];
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Why save this data to a table? It can be calculated when needed.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    squaredev1 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    3
    Yeah i suppose i could but what is the query going to look like to just show me the newest data of those 5 Table Values shown in TagTable i am going to have this query or stored procedure run every day at 11:59:00 PM

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Several ways to go, depending on what you want.

    Do you want the 'Newest' record from FloatTable for each TagIndex/TagName?

    For one possible method, review http://allenbrowne.com/subquery-01.html#TopN
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    squaredev1 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    3

    Help with a New Data Query

    o.k, err this database gets populated every 23 Hr's "Fire's Once" then i am wanting the newest data from the 'Newest' record from FloatTable for each TagIndex/TagName? yes

    i was thinking of Maybe letting the data Get into the Float-Table > then grab it "it's going into Excel" . then move that data into the Historical for Historical backup reasons ,"flush out the Float Tasble" then use the Historical Table When needed

    If i flush the Float table after grabbing it then i havent got to worry about grabbing the latest data it will be the Only 5 Values Available to get that would be New data , i would worry about that when wanting to grab that data from the historical Table

    so in that respect maybe a query to move the 5 values to the Historical table , and flush the Float-table

    Does that make since to everyone ,










    Quote Originally Posted by June7 View Post
    Several ways to go, depending on what you want.

    Do you want the 'Newest' record from FloatTable for each TagIndex/TagName?

    For one possible method, review http://allenbrowne.com/subquery-01.html#TopN

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

Similar Threads

  1. Replies: 6
    Last Post: 08-17-2014, 06:14 PM
  2. Replies: 2
    Last Post: 12-17-2012, 03:46 PM
  3. Replies: 27
    Last Post: 08-14-2012, 09:05 AM
  4. Replies: 13
    Last Post: 10-26-2011, 03:49 AM
  5. UnMatched Data Query (Edit Data)
    By pedraza4 in forum Queries
    Replies: 3
    Last Post: 06-16-2010, 07:29 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