I’m using MS-Access. I have a table A looks like : I need to insert into a table B that looks like: Can I do it with an SQL instruction? Answer If the id field in table B is an Autonumber and ordering of the values is important, then you can use keep in mind that the value field name
Tag: ms-access
Speeding Up Access 2016 Query
I have a query that contains amongst other things batsmanIDs and League names (extract below). I have put together another query to return all records where a batsman has played in each of two Leagues. The query works but it is very, very slow. There are 48,000 records returned in the first query but when I use that it runs
Convert columns to rows and get the sum of checkboxes in Access
I have an Access database that has checkboxes in on of the tables. I need to get a Sum of the checkboxes but, I want to convert the checkbox columns into rows instead of columns. Here is an example …
Sum By Group in Access 2016 Query
I have a query that returns the following data: I am trying to adapt it to sum the total number of runs at each venue. I have come up with the query below but there are two issues: it is not summing by venue it is summing all runs; it takes a very long time to run. Can anyone see
A difference of 10 days in Access SQL
I want to show how many orders have been shipped 10 days before the required date in Access SQL, but I can’t seem to get the syntax right. Answer
Covert Access Cross tab to sql
I need this converted to a SQL view. This is the code from MS Access: Any ideas how to re write this into SQL ? In products I have id, BelsCategoryID. In Categories, I have ID. In Sold, I have BelsProductID and year. – This table shows weather a product is sold in a given year. I want the result
How to display a list of departments whose teachers teach DBMS department students?
I have a database in Access. The database has 4 tables: [DEPARTMENT], [TEACHER], [LECTURE], [SGROUP]. I need to display a list of departments whose teachers teach DBMS department students. The …
left join taking too long
I have an issue with query performance and cant find out how to fix it. Both tables have 20k rows Prod_id like indexes but not primary key because table 1 has duplicates with different month, year etc I need to get table like this (table1 * wh = 80k rows): I’m using LEFT JOIN to do this but takes too
MS Access: How do I find an employee with the latest date with “Working” or “Reinstated” status only?
tbl_emp_mast tbl_emp_st For the purpose of the combo box in the form, I wanted only those employees who are currently working. So, there should be employees # 1 and 3 from the query result. I tried this: Thank you. Answer Hmmm . . . I think you want the most recent emp_st. If so, then I think:
MS Access – how to rank with 3 variables
I am trying to rank using 3 variables from the sample data below: +————-+———-+—————–+——–+ | Case Number | Doc Type | Document Number | Rank | +————-+———-+—————–+——–+ | 1 | A | 3787104 | 1 | | 1 | B | 3786773 | 2 | | 2 | A | 3787505 | 1 | | 3 | A | 3787525