Today's blog post will be the first of a series that will speak about using the SQL query function within MapInfo to search through your data. For example how many points or items fall within a certain polygon area would be very useful when you have defined a custom area.
This blog post will just introduce SQL and a little about how to use it. Next week we will move onto more detail about how to use SQL within MapInfo.
SQL is Structured Query Language and a very widely used computer language to work with databases, be it inserting, manipulating or deleting data from a table or tables (containing the data) or search for specific subsets of the data from within those tables.
If you learn how to use SQL it will be useful very widely with almost any database program you can think of including Microsoft Access, SQL Server, MySQL and Oracle databases.
Although it can become far more complicated almost all SQL queries use the following 4 main points in their construction.
SELECT (name of piece of data you are looking for) FROM (insert the name of the data table that contains the data you are selecting from) WHERE (this is optional but if you want to find all points larger than a certain figure this is where you add the constraint that you would like to impose) ORDER BY (this is where you add the order which you would like the data to be presented in, usually date order)
So for example if a company wanted to know which of their employee's had brithday's during the month of September the query would run as follows.
SELECT name FROM employee_table WHERE month = September ORDER BY date ascending
A full explanation of SQL is beyond this blog so we're going to leave our introduction to SQL there. This will hopefully give you a high level overview of SQL and so allow us to look further at the SQL search functionality that MapInfo contains over our next few blog posts.
This blog post will just introduce SQL and a little about how to use it. Next week we will move onto more detail about how to use SQL within MapInfo.
SQL is Structured Query Language and a very widely used computer language to work with databases, be it inserting, manipulating or deleting data from a table or tables (containing the data) or search for specific subsets of the data from within those tables.
If you learn how to use SQL it will be useful very widely with almost any database program you can think of including Microsoft Access, SQL Server, MySQL and Oracle databases.
Although it can become far more complicated almost all SQL queries use the following 4 main points in their construction.
SELECT (name of piece of data you are looking for) FROM (insert the name of the data table that contains the data you are selecting from) WHERE (this is optional but if you want to find all points larger than a certain figure this is where you add the constraint that you would like to impose) ORDER BY (this is where you add the order which you would like the data to be presented in, usually date order)
So for example if a company wanted to know which of their employee's had brithday's during the month of September the query would run as follows.
SELECT name FROM employee_table WHERE month = September ORDER BY date ascending
A full explanation of SQL is beyond this blog so we're going to leave our introduction to SQL there. This will hopefully give you a high level overview of SQL and so allow us to look further at the SQL search functionality that MapInfo contains over our next few blog posts.