Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 208737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:51:09+00:00 2026-05-11T17:51:09+00:00

I am pulling data from one table, called analyzedCopy, and using it to over-rite

  • 0

I am pulling data from one table, called analyzedCopy, and using it to over-rite all information in another table called analyzed. The columns I’m sorting/filtering/manipulating, are readings_miu_id, ReadDate, ReadTime, RSSI. I am currently moving data from analyzedCopy to analyzed using the following sql that to get only the last time(highest value in ReadTime since it is formatted to military time) for each unique pair of readings_miu_id and ReadDate.

SELECT readings_miu_id, Reading, ReadDate, ReadTime, MIUwindow, SN, Noise, RSSI, ColRSSI,MIURSSI,Firmware,CFGDate,FreqCorr,Active,MeterType,OriginCol,ColID,Ownage,SiteID,PremID, prem_group1, prem_group2,ReadID  
    INTO analyzed  
    FROM analyzedCopy AS A  
    WHERE  ReadDate BETWEEN #04/21/09# AND #04/29/09#  AND ReadTime=  (SELECT TOP 1 analyzedCopy.ReadTime FROM analyzedCopy  
    WHERE analyzedCopy.readings_miu_id = A.readings_miu_id  AND analyzedCopy.ReadDate = A.ReadDate  
    ORDER BY analyzedCopy.readings_miu_id, analyzedCopy.ReadDate, analyzedCopy.ReadTime DESC)

   ORDER BY A.readings_miu_id, A.ReadDate, A.ReadTime DESC ; 

I need to add to this code the ability to put into the table "analyzed" one record per readings_miu_id while changing the ReadDate to show the desired date range (in this case it would need to show something like "4/21/09 to 4/29/09") and while also taking the average of the values in RSSI for each DISTINCT reading_miu_id and inserting that average RSSI into the RSSI field in the analyzed table.

In an attempt to recap/overview, I have a code to insert into a table all of the records from another table where ReadTime is the highest for each unique readings_miu_id and ReadDate combonation. And I need to add to this code the ability to take the average RSSI of the already sorted (the step in the previous sentence) records and insert that average into RSSI in analyzed and insert the date range into the ReadDate in analyzed.

I realize that I’m probably asking for alot here and if i need to use two or three different steps or SQL code thats fine. the program this is going into will not be used by many people and my boss doesn’t care if the code is messy or that it will take a little while to run. I cringe at being forced to do things so inefficiently and messy, but it is what I am being forced to do.

I should be able to use the sum() feature in there to sum up the RSSI values im just not sure how to do that while dividing the sum by the count for each DISTINCT readings_miu_id and while doing everything else I need done to this data. Using VB.NET 2008 and sqlServer i could run each line through some logic statements to do what i need to to the data but I don’t know how to do that in an SQL or VBA.


Edit:

If I didn’t explain something well enough, please let me know and I will try to correct and add info to the best of my abilities.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:51:09+00:00Added an answer on May 11, 2026 at 5:51 pm

    Tackle the problem one issue at a time. Create tables for each step, AnalyzedStep1, AnalyzedStep2, and so on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer bindfs seems like what you're after... May 11, 2026 at 11:27 pm
  • Editorial Team
    Editorial Team added an answer Have you tried this: tar zvPcf /home/test/backups/backup.tar.gz /home/test/backups/../data/ May 11, 2026 at 11:27 pm
  • Editorial Team
    Editorial Team added an answer I believe you need this... select T.ColA, T.ColB, T.ColC from… May 11, 2026 at 11:27 pm

Related Questions

I need to pull data from two tables: Neptune_FN_Analysis and Neptune_prem There will be
In my MS SQL Server database I am pulling transaction data based on a
I also have a desktop application written in Windows Forms that is a middling
I ran across a new problem in the last week. Due to the nature

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.