Struggling on a most probably very simple query for MS Access, but couldn’t nail it for 3 days already. Any help would be highly appreciated.. There are 2 tables – Regions (REGNAME) and Cities (REGNAME, NAME, POPULATION) I need to get the top 10 cities sorted by the population in descending order for each region. There’s no problem to do
Tag: ms-access
Using VBscript and SQL on an Access database how do you select records based on a date comparison with todays date
This sounds like a very naive question but I can not get this simple requirement to work. A selection is made on one page of the website which passes a parameter time_period (which is 1, 7, 31 or 365) to the next page which should list all of the selected records where the LastUpdated date (a standard date field in
Query to delete duplicate records from MS Access
I have a table with multiple duplicate records. I’m using MS Access. I would like to delete duplicate records using a query. This is the table sample: I want my query result to be: Is here any way to do this in MS Access? Perhaps using SQL? I tried using query wizard but it only gives me list of duplicate
SLOW running query in MS access
What causing this query to execute long time. Is sub query block creating a mess? Answer I believe that the problem is that for every record of the INNER JOIN you are looping over all the records of the WD table.
Capacity Management database
I am designing database using Microsoft Access for capacity management. I have different types of equipment and need to track the power usage by every month. For instance, I have HVAC system and Chiller System. Withing each system there are different equipments like AHU_1, AHU_2 ,AHU_3, MAU_1, MAU_2 and etc in HVAC system and CHWP_1, CHWP_2, CWP_1, CWP_2 and etc
Return a string using the month part of a date field
I am trying to create a query which populates the salesPeriod field from the salesDate field. The query should return a string value based on the date part of the salesDate. The conditions are: If month is equal to equal to 11, 12, 1, return “Christmas Sales” If month is equal to 6,7,8 return “Summer sales”. Otherwise return return “N/A”
Access Query to return custom quarters from a date field
If someone could help me out on this problem. This company’s quarter starts as follows where the numbers represent the months and the Q’s are the quarters. I am trying to make a query a that returns the number 1, 2, 3, 4 for dates that fall within the quarters. I have researched and came across this approach but doesn’t
Can’t find a field in a table
I have a table containing the field ‘cost’, when I try to extract its value from the table I get an error saying the field was not found. function TSQLs.Get(value,room,hotel: string): string; begin …
Convert specific MS Access query to SQL Server query
I have MS Access query and try to convert to SQL Server query. Please someone can help me. UPDATE AppReferrals SET AppReferrals.DeviceID = CLng(Val(Left(IIf([AppReferrals].[DeviceID] Like ‘0’,[…
Time calculation from Date & Time
I am trying to figure out a way where I can use MS access to convert the the following data to show the minutes spent within each column, whilst also discounting weekends from the final figure. This …