Articles

Family Historian : Creating a Simple Query



in this video we're going to work through and create a query so the first thing we need to do is open up a query window which can be accessed using this small icon at the top this is a query window it has four tabs a general tab the columns tab a rows tab and a results set so we're going to start off in the general tab so the first thing we need to do we're going to create in your query is come over to the query menu and select new custom query and we're going to call it demo married woman so what we can do now if we can select that it's an individual one what this means is that each record in your family in your file for individuals will have a line in the query you also have several other options the most commonly used ones are individual and family you will occasionally may need to use source the final one is fact this is a very useful one but it's better to work this one once you've understood the others and it isn't quite as straightforward to build the lines but it has a huge advantage in that if you need to search for incident for all the occupations of a person or all the residents of a person this one has one line perfect and not luck one line per individual but for now we're going to stick with individual and click create okay so we now have our query now the first thing I always recommend you do is to go in and put in a description so what we can do here it's going to be this all married women with certainly we can give this a title this is what will appear on reports and we can leave all the other settings on this page the same the next tab we're going to look at its the columns tab now this is exactly what it says it will define the columns that will go across the page so what we've got here is if I simply run this query now by clicking a button we've got a list of people and there's only one column and it just says individual so if we return to the columns we can go in and start adding the information we want so in this case what we're interested in is the surname of the person that this woman is this person is married to so we can go down to this folks tab shortcut we can go down to name and we can pick up the surname so we can put that in now if we run our result set what you'll find is that you can now see we've got people that are married to other people but you can also see we've got all the men so there's nothing we can do about this on the columns because the columns are only showing you what's going to be there the tab we need is the rows tab and what we want to do now is exclude the information we're not interested in so what we can say we can drop this down we've got added add unless it's glued if and it's glued unless these can take some thinking about but the best thing to do is to stick to what you want to do so I want to exclude people and I can come right over here and say what I want to exclude I can say I want to exclude sex where the sex matches mail and it's actually brought bad in for me and we can use a drop-down to select one we want now the female so what we're saying is exclude all the men so we can add that one in so now if we run our report but a much shorter list and as you can see all we've got on this side is women but we've still got all the unmarried ones so we can return to our Rose column we can say exclude if we can come over here and we can say family is space is and if you can see the operator and the value of change to match what we're doing we can say is null so what we're saying once we've added that line is exclude them if they're meant and exclude them if they don't have a family of space so again we can print the report we've now got a much shorter list now what we've got at the moment is the columns show up that way around and at the moment they're just sorted by whatever order because we haven't told it what we want to do so what we can do now go back to what columns tab pick up the space name and as with normal in the family story there are two little arrows down here to allow you to reorder things so let's move the space name to the top and the other thing we've got is a sort order so what we can do here if we want to sort them ascending and that's fine and the other thing we might want to do is go to the individual again get all the given names like that in put that up and sorted ascending so what we've seen now is when we run that we've now got a list sorted by the faith journey and then sorted by name so we've now got all our married women in a sorted order and the next stage on from that let's say you wanted to find cursed all the Monroes that's what we can do again we go back to the roads because that's what controls what we see we can add in another exclude if we can come over we can grab our selection say the surname what we can say here is we can say exclude unless the surname matches now what we could do here is with the type Monroe in but in order to make the query more useful we can go over and say a parameter we can type in surname this is just a name so you know what it is you're looking for we can add that ok so what we can do now is we can run our query in it or prompt what's there and angry wants that we want Monroe and as you can see we've now just got the people whose maiden name was Monroe and you might say well I thought very good but I wanted the ones who's married name with Monroe that's what we can do we can go back to our rows come down what's her name one you can come in here and what you can also do because we've already got a column that we want to search on we can drop this down we can pick up the space surname from the second column and we can update that one now we can run it it's getting it's remembered if we wanted to do Monroe now we've got all the women who's married name was Monroe I hope that gives you a quick introduction to the query and they all be happy to experiment one big advantage with queries they don't update anything they don't change anything so play with them to your heart's content you're not going to do any harm at all

Author Since: Mar 11, 2019

Related Post