Relative Content

Tag Archive for sqlms-access

Use SQL to combine multiple Crosstab query results into individual Bins (ranges)

I have an Excel worksheet that shows counts of 11 Bins (column ranges) – see image – that result from one Access data set. Instead of linking from Excel, I want to do this in Access. I can create individual queries – no problem. I have created a Crosstab query for each of the 11 Bins as well. The image is of 1 of the CT queries. To get a result like the Excel result I have to then design a second query with the 11 CT results, then add each of those “rows” as a separate field. I just know that running nested queries in a query is not the right approach. While it works, it is incredibly inefficient and consumes a lot of resources. I’m certain there is a SQL solution – not UNION – where the script will perform each of the 11 crosstabs using the Bin criteria, then creating the array. I’m great at Excel and good at Access VBA, but not much experience in SQL. Please help (and be patient).

Use SQL to combine multiple Crosstab query results into individual Bins (ranges)

I have an Excel worksheet that shows counts of 11 Bins (column ranges) – see image – that result from one Access data set. Instead of linking from Excel, I want to do this in Access. I can create individual queries – no problem. I have created a Crosstab query for each of the 11 Bins as well. The image is of 1 of the CT queries. To get a result like the Excel result I have to then design a second query with the 11 CT results, then add each of those “rows” as a separate field. I just know that running nested queries in a query is not the right approach. While it works, it is incredibly inefficient and consumes a lot of resources. I’m certain there is a SQL solution – not UNION – where the script will perform each of the 11 crosstabs using the Bin criteria, then creating the array. I’m great at Excel and good at Access VBA, but not much experience in SQL. Please help (and be patient).

Field could refer to more than one table listed

Hi i would like to ask for your assistance why i’m getting error. “The specified field ‘t0.UserID’ could refer to more than one table in the FROM clause of your SQL statement.”