On 2018/10/27 8:39 PM, am...@juno.com wrote:
10/27/18 Dear Good People: I have two issues which I have not been able to
solve. Hopefully at least one of you good people know how to do these. The
first is: how do I make a field wrap the text. In other words, rather than
having the text in a field keep going from right to left, when I hit the right
hand margin, how do I make the text automatically go to the next line. The
second is: how do I simultaneously nest two or more fields. For instance, if I
have four fields: name, department, clock number, department, how do I nest so
that I alphabetically, sort by the clock number, then last name within each
department, and ten clock number within in each name? As always, if you have
any questions, need more information, and/or need any clarifications, ask away.
Respectfully yours, Alex Stavis
Hi Alex,
SQLite is a database Engine, it stores data, it doesn't deal in any way
with presenting that data to a user. Wrapping is handled by visual
controls presenting data to the user - much like this very mail I am
writing. My lines may appear shorter or longer than the ones you see,
because my mail control displaying this message as I type might be
differently sized to the mail reader control you are viewing it on. That
says nothing about the actual data (which incidentally is stored in
SQLite since I'm typing this on Mozilla Thunderbird) - what I type here
is still what you read, even if wrapped differently on your side. SQLite
(or any database engine FTM) has no say in the displaying / wrapping of
data.
Lastly, I don't know how you are viewing the data you are talking about,
but if it were the data coming from SQLite (or any other DB engine) from
a standard SQL query, you can easily sort by multiple fields in any
order you so prefer by adding an ORDER BY clause at the end.
That said, it is impossible to sort by how you asked, which I infer to
mean: "sort by clock number, then by department, then by name, then by
clock number again" - if clock number was sorted to start with, it is
impossible in the rules of this Universe (abiding by the commandments of
the great God "Algebra") that any subsequent ordering would re-benefit
from sorting by the very same clock number.
It's a bit like saying: Get me all the Smiths in the phone book... now
see who of them all live in a house numbered 33, and of those Smiths
living in a no. 33, who of them are named Smith? The last condition is
superfluous, and makes no sense at all.
Perhaps if you add a lot more detail about the actual schema you are
using, the query you are needing ordered, and even which platforms you
are developing on. Even if it's not directly an SQLite thing, many
people here from different platforms read the list and may have some
advice - but we need some better idea of the problem. :)
Cheers,
Ryan
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users