I have a table where one id has multiple entries. For each id, as long as there is an entry where mark is "1", it is considered marked. i want to know how many ids are marked. in this case there are 2.
thank you
This seems like what you want...
UniqueCount(If([Mark] = 1,[ID]))
Related
Apologies if this has been asked and answered but I haven't managed to find a match.
I have built a spreadsheet that lists all the movies in my collection. In that I have two columns that contain the Genres and four that list up to that number of principle actors like this...
A given genre can appear in either of those two columns D & E. An actor's name in any one of columns G,H,I,J. What I want to be able to do is have a filter that shows all the values across all the relevant columns in a drop-down list, as you get when you filter a single column. In other words, when I click the filter for Genre it shows 'drama' in the drop-down whether 'drama' is in column D or E and if selected shows results where it's in either column. Similar for actors names.
Is it possible to achieve this? I know I can use advanced filter to build an 'OR' query across column D & E but as far as I can see there's no way of making that list the available values across the columns and allow a choice - you have to know in advance what you are looking for.
You should also know I'm running an old release (2007) of Excel so any answer ideally has to work in that version, although if there is a way of doing so in a later release I am still interested in hearing that..
I think you would need to separate genres into 2 columns. say Genres A and Genres B, therefore you could apply filter for these columns
My first post/question here, I have searched and tried many options but nothing seems to fit exactly what I need.
I am building an Access DB to manage scheduling work and assigning employees to that work. The Scheduled work comes from an Excel Sheet that I've imported into Access. I don't have control over how the data comes to me or the format.
So I have a table 'tblTempP6' with the scheduled work for the year. Several columns determine a unique entry.
I have another table 'shtP6DataEast' has an index which is the primary key. the two tables are the same except shtP6DataEast entries has and index. so i can access specific entries and assign employees etc..
Each time i get a new sheet to import the existing scheduled work is still in the sheet and i dont want duplicate entries with different ids.
I have tried Left Joins but have had issues because i need to use 4 columns as the unique identifier...
Any thought?
Thanks
forgive my NOOB Question
SELECT tblTempP6.[Project #], tblTempP6.[Work Order #], tblTempP6.[Project Name], tblTempP6.[Activity Name], tblTempP6.[TOA #], tblTempP6.Start, tblTempP6.Finish, tblTempP6.[Budgeted Labor Units], tblTempP6.[S/S - SUBSTATION], tblTempP6.iCircuit, tblTempP6.isStreet, tblTempP6.[Test Group Work Type], tblTempP6.Comments, tblTempP6.[Resource IDs]
FROM tblTempP6
LEFT JOIN shtP6DataEast ON tblTempP6.[Project Name] = shtP6DataEast.[Project Name]
WHERE (((shtP6DataEast.[Project Name]) Is Null));
Well I will try to answer this generally, using tmp as the name of the table with the freshly imported and possibly duplicated data, and dat as the name of the table with the previously imported, permanent data.
There's a bunch of ways to do it, here's how to do it with LEFT JOIN:
SELECT *
FROM tmp
LEFT JOIN dat ON tmp.KeyCol1 = dat.KeyCol1
AND tmp.KeyCol2 = dat.KeyCol2
AND tmp.KeyCol3 = dat.KeyCol3
AND tmp.KeyCol4 = dat.KeyCol4
WHERE dat.IDcol IS NULL
You do the left join against the existing data, and then exclude all rows that actually matched to that table.
I have a table with a bunch of people in rows. On the columns are the skills that they have. There's a bunch of them.
Now all the people there work in different departments, sales, store, CS and etc. Some of them though work on several positions. There is no column for this.
What I need is a way to apply a filter that will give me all the people working in Sales department for example, but without a column there I can't use normal filter.
Is there a way that I can tag a row with say "Sales" tag and then filter the people having that tag? I would also like to add multiple tags to people not just one as they can work in different departments.
Add a new column, but hide it (right-clink on its header and select Hide).
Here i want to search from one table's column to another table's column.
so if the string is "Introduction To Php" so this string will compare to another table all data for particular column but the new things is order of words may be different in table.
i.e : it can be like "Php introduction to" , "to indtroduction php" and so on... means combination of different words and there place in the string should be compare with
If you have any idea related this , please answer for this question.
Thanks a lot in advance..
You may be interested in full-text search functions in MySQL http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html
Rookie question I know.
I have a table with about 10 fields, one of the fields is a category field. I need this field to exist because of the multiple types of categories. However, one category in this field is wrong and is duplicating results.
So can I delete all records in the table that have "Type320" in the CatDescription field, and how? I want to keep eveerything else as it is in this table; just need to get rid of the records that have that that in that one field
Thanks very much!
EDIT: Thanks for the answer, I did not know how to do this so this is very helpful
However, this is more complicated than I thought. The raw data that I am supplied carries these duplicate records (only duplicate in certain circumstances but they are easy to isolate). This raw data is given to me on a monthly basis in several spreadsheet forms.
It all relates to these ID numbers, and has like 10 fields (xls columns). As I said before one of these is the Category Description field (sorry, this is not a lookup) In certain places this records automatically duplicates itself on output because in the database this comes from, it has to have this sub category for one particular "type"
So....every time there is a duplication, every single bit of information in all fields are exactly the same, with the exception of this CatDescription (one is Type320, and the duplicated record type is "Type321"). However, there are some instances where Type321 is valid on it's own (in which case there is no matching data row with a Type320 catdescription). By matching I mean all data in all fields of a particular record.
A very clear absolute of this is if all fields (data within) of a record with Type320 CatDescription, matches all fields (data within) a record with Type321 CatDescription, then I can delete that record containing Type321 CatDescription. This is true because this is the only situation where this duplication occurs, normally not all of this should match.
This allows all unique records with Type320 and Type321 data (that does not match exactly) to stay; just a it should. This makes sense to me (and hopefully you too :/) but can it be done, and how?
thanks because this is way over my head. I would rather know how to do it in access, but an xls solution is equally as appreciate. heck i would do it in ppt if it would get the job done! :)
I would try with one of these two querys:
DELETE FROM table WHERE CatDescription LIKE '%Type320%';
DELETE FROM table WHERE CatDescription LIKE '*Type320*';
That because the Access database engine could be using * (ANSI-89 Query Mode e.g. DAO) instead of % (ANSI-92 Query Mode e.g. OLE DB/ADO) for the wildcards.
Alternatively, this regardless of ANSI Query Mode:
DELETE FROM table WHERE CatDescription ALIKE '%Type320%';
Note the Access database engine's ALIKE keyword is not officially supported.
Does the CatDescription field look to another table? Is it a a query of those tables that creates what you call duplicate results?
If so, be careful about blaming the table that has CatDescription. Check the look-up table to see if Type320 is found there in duplicate.
If you don't have the problem isolated correctly, then you're likely to delete good records while not fixing the problem.