On Apr 18, 2006, at 10:52 AM, Trausti Thor Johannsson wrote:
The table is like this :
_id int primary key
sometext varchar
....
connection int
the connection can be 0, or it can be connecting to the _id. I want
to display all data regardless of connection, but if there is a
connection it should trail it, like :
1 text1 0
2 text2 0
5 Sometextconn2 2
3 text3 0
4 text4 0
Anyone know how to do that ?
Any reason a query like
select _id, sometext, connection from table
won't work for you ?
If connection can be NULL maybe
select _id, sometext, coalesce(connection,'0') from table
assuming the database engine you're using supports "coalesce" or
something like it
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>