Help!

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Help!

ams64@juno.com
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  
____________________________________________________________
Gut Doctor Begs Americans - "Throw This Vegetable Now"
food-frauds.com
http://thirdpartyoffers.juno.com/TGL3131/5bd4b12c4eb0b312c7c70st03vuc
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Help!

Igor Korot
Hi,

On Sat, Oct 27, 2018 at 1:41 PM [hidden email] <[hidden email]> 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

On top of all other people told you - you most likely have an error in
you schema.
The department field appears twice in you table.

Thank you.

> ____________________________________________________________
> Gut Doctor Begs Americans - "Throw This Vegetable Now"
> food-frauds.com
> http://thirdpartyoffers.juno.com/TGL3131/5bd4b12c4eb0b312c7c70st03vuc
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Help!

Clemens Ladisch
In reply to this post by ams64@juno.com
[hidden email] wrote:
> 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 purpose of SQLite is to store data, and to give it back to you
unchanged.  How the data is formatted for displaying is not the database's
concern.

It is likely that the software that you're using to display fields has an
option for automatic word wrapping, but nobody here knows what software
that 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?

Just put the column names in this order in the ORDER BY clause when doing
the SQL query.  (Assuming that whatever software you're using allows you
to customize the query.)


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Help!

R Smith-2
In reply to this post by ams64@juno.com
On 2018/10/27 8:39 PM, [hidden email] 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
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Help!

ams64@juno.com
In reply to this post by ams64@juno.com
10/27/18 Thanks so much Clements, Respectfully yours, Alex Stavis

---------- Original Message ----------
From: Clemens Ladisch <[hidden email]>
To: [hidden email]
Subject: Re: [sqlite] Help!
Date: Sat, 27 Oct 2018 21:55:28 +0200

[hidden email] wrote:
> 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 purpose of SQLite is to store data, and to give it back to you
unchanged.  How the data is formatted for displaying is not the database's
concern.

It is likely that the software that you're using to display fields has an
option for automatic word wrapping, but nobody here knows what software
that 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?

Just put the column names in this order in the ORDER BY clause when doing
the SQL query.  (Assuming that whatever software you're using allows you
to customize the query.)


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
____________________________________________________________
Study Reveals What Just A Single Diet Soda Does To Your...
nucific.com
http://thirdpartyoffers.juno.com/TGL3131/5bd4e08e9cb8608d3d62st04vuc
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Help!

ams64@juno.com
In reply to this post by ams64@juno.com
10/27/18 Thanks so much Clements, Respectfully yours, Alex Stavis

---------- Original Message ----------
From: Clemens Ladisch <[hidden email]>
To: [hidden email]
Subject: Re: [sqlite] Help!
Date: Sat, 27 Oct 2018 21:55:28 +0200

[hidden email] wrote:
> 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 purpose of SQLite is to store data, and to give it back to you
unchanged.  How the data is formatted for displaying is not the database's
concern.

It is likely that the software that you're using to display fields has an
option for automatic word wrapping, but nobody here knows what software
that 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?

Just put the column names in this order in the ORDER BY clause when doing
the SQL query.  (Assuming that whatever software you're using allows you
to customize the query.)


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
____________________________________________________________
No More Tinnitus: 1 Odd Trick Ends The Ringing Overnight
fighttinnitusnow.com
http://thirdpartyoffers.juno.com/TGL3131/5bd4e14437d6a61444dd4st04vuc
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users