Skip to main content
The 2024 Developer Survey results are live! See the results
5 votes
Accepted

Fill percentage of total field with MS Access SQL

You need UPDATE, not INSERT: UPDATE MyTable SET F = f / (SELECT SUM(f) AS fSum FROM MyTable) ; or: UPDATE MyTable AS my, (SELECT SUM(f) AS fSum FROM MyTable) AS total SET my.F = my.f / ...
ypercubeᵀᴹ's user avatar
4 votes

Fill percentage of total field conditional on some other field with MS Access SQL

Your last UPDATE statement should work. Access is often a bit crap though so although it should work, it probably won't. Thanks Microsoft Access dev team (probably more specifically the updates to JET)...
blobbles's user avatar
  • 1,621
2 votes
Accepted

Make custom query from two table access

Open the query designer for a new query. Add the tables you are interested in. Drag the field number from table1 to table2 Drag the field code from table1 to table2 Right click on each of the lines ...
Kenneth Fisher's user avatar
1 vote

How to Stop MS Access From Undesired Cascading Delete?

Solved it. Making the Row Source into a read-only query solves it. The easiest way to make a query read-only is to include some computation; the easiest computation is to add 'distinct'. e.g. I ...
Kevin Kleinfelter's user avatar
1 vote

Access Macro: ApplyFilter w/values from 2 combo boxes

Oh. Well, I figured it out. I didn't realize that when I use OR, the macro parses it like WHERE (X LIKE Y) OR (X Like Z). The solution is as follows: ApplyFilter WHERE Table!Articles!IntCodes LIKE "...
pmusser's user avatar
  • 121
1 vote

Make custom query from two table access

The query would look something like this: SELECT [Table1].[Code], [Table1].[Number], [Table2].[Name1], [Table2].[Family] ... FROM [Table1] LEFT OUTER JOIN [Table2] ON [Table1]....
Randolph West's user avatar
1 vote

How to simplify this query?

For every row where Place1 is null, you are returning an empty string as item_sku. So without DISTINCT all such entries would be returned as item_sku Place1 -------- ------ NULL ...
Andriy M's user avatar
  • 23.1k

Only top scored, non community-wiki answers of a minimum length are eligible