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.

enter image description here

  • btw, I think you are missing either AND or OR where you have highlighted it with yellow – Peter Horsbøll Møller Apr 9 '14 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 Carr Apr 10 '14 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øller Apr 10 '14 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 Carr Apr 10 '14 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 Carr Apr 10 '14 at 12:58

You can use Ctrl + Enter to insert new lines in the fields to make it easier to read the query in the dialog

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.