Is there a character I need to use to state a new line in the MapInfo SQL Select box (e.g like ; in SQL Management Studio) or is this not possible. The highlighted (yellow) area is where the new line begins.
-
btw, I think you are missing either AND or OR where you have highlighted it with yellow– Peter Horsbøll MøllerApr 9, 2014 at 13:26
-
Hi Pete, I'm not sure if I explained this properly but where the gap is I want it to be a 'new' query, aka so each query would be returned as a new line in the selection table– Alan CarrApr 10, 2014 at 11:03
-
I don't follow. Normally each record in the result will be a record in the input table. Or each record can be a grouped set of values from the input table. Can you explain a bit more what you are trying to do?– Peter Horsbøll MøllerApr 10, 2014 at 12:13
-
I am trying to build a massive query to return the average of a column between certain values. I have now realised I have WAY too many queries to run (~29,000) so I have cheated a little and populated a csv with the query as each line: i.imgur.com/8RhjvT5.png then using MapBasic I have it run the query for each row in the table and append the results to a new table: i.imgur.com/e6JKtTW.png– Alan CarrApr 10, 2014 at 12:56
-
Using something other than MapInfo to perform these SQL queries would probably be much more efficient but I had to find a way that involved the current skills I have, I think asking for some SQL training from my employer next is a must– Alan CarrApr 10, 2014 at 12:58
2 Answers
You can use Ctrl + Enter to insert new lines in the fields to make it easier to read the query in the dialog
Not an expert, but try one of these: https://stackoverflow.com/questions/1085662/new-line-in-sql-query