2
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by danny4444
0

If I have understood this correct, you want to select all rows that come under 'Tinamidae'?

Firstly I would structure the data so that all rows have an entry within the Family column. This means repeating the term 'Tinamidae' for all the members of that family within the family column. Then you would select them with the statement.

SELECT * FROM `table_name` WHERE `Family` = 'Tinamidae';

I'm not sure if I haven understood you correctly. I'm no expert on SQL either.

Hope this helps.

Danny

0

Now, it just selects one row. If you check the table in the link, you'l see that between the Tinamidae and the next non empty field there are some empty fields. Well, I would like to select all the fields of the record between the Tinamidae and the next non empty field specifying only the first record (Tinamidae, in this case).
Cheers!

Dani

0

I don't believe the table you have shown is structured like data in a MySQL table should be.

Something like this would allow you easy access to the information you are after, with the select statement I gave you.

[U]Family	        Genus	  Species	English name[/U]
		
Tinamidae	Tinamus	  tao	        Grey Tinamou
Tinamidae	Tinamus	  solitarius    Solitary Tinamou
Tinamidae	Tinamus	  osgoodi	Black Tinamou
Tinamidae	Tinamus	  major	        Great Tinamou

Otherwise I don't think there is a way to identify the entries your after. At least not that I can fathom.

Hope this helps.

Cheers.

Danny

0

I'm afraid so. The problem is that I am working with a csv file that has this structure. I guess I'll have to format it.
Cheers!
Dani

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.