0

There are multiple rows in my .tab file in mapinfo. Is there any way to select nth row in mapbasic window of mapinfo?

2 Answers 2

4

Select * from 'table' Where RowID = n

If you want it into a selection table of your choice, put the selection into somename, then browse * from somename If not, just Browse from selection

edit

This is all from memory, so please play about and also read the online reference manual:

MapBasic Ref

MapInfo -L

4
  • By the way, the help is ok.
    – Hairy
    Aug 11, 2011 at 7:41
  • nps. Seriously though, have a look at the help, as they'll give code samples, you can play with. I'd also recommend 'MapInfo -l'. It's sort of a way of searching through some cracking code samples.
    – Hairy
    Aug 11, 2011 at 7:50
  • yes I have the user guide I am studying but small things confuse me :(
    – kinkajou
    Aug 11, 2011 at 7:57
  • well, nps, you'll get answers here as long as you accept them and act in good grace (which I fail to do sometimes).
    – Hairy
    Aug 11, 2011 at 8:48
0

Very simple with Fetch:

Fetch rec 125 From Database

will find record #125 in your database...

1
  • Fetch will only set the cursor at that position and not "select" the actual row. But it does depend on what he wants to do with the row afterwards Aug 5, 2015 at 19:34

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.