Re: [sqlite] multiple order by value bug?
On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: No, I accomodate only te kereset.datum colum to the ORDER BY clause, and then the result come wrong. Ah. Ok. Sorry for the confusion. - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] multiple order by value bug?
I also have an issue with "Order By" with one of my queries as well. I am doing a multi field Order By and the second of the two fields does not sort in the correct order. I do not have the code in front of me, so can't supply any details. I have been killing bigger alligators on that project so the Order By issue is on the "to do" list. I just figured it was my Select statement, although it is pretty straight forward, as I remember. Perhaps there is a bug report in the making. Fred > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 12, 2006 2:41 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] multiple order by value bug? > > > Will Leshner írta: > > > On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > >> This query works fine (I think my collate function too), but if I > >> accomodate > >> it with "ORDER BY szemely.nev,szemely.anyanev,kereset.datum", then > >> sorting > >> is in wrong order. > > > > Do you mean you have two "ORDER BY" clauses? Seems like > that would be > > a syntax error, or, at best, undefined. > > No, I accomodate only te kereset.datum colum to the ORDER BY > clause, and > then the result come wrong. > > The two columns (szemely.nev,szemely.anyanev) collated by my > func, and the > third column that I accomodate is collated by the default > sqlite func. > > I want to sort by szemely.nev and when szemely nev is equal, sort by > szemely.anyanev. Then I would like to sort the result by > kereset.datum. > > nev|anyanev|datum > 1. aaa|bbb|111 > 2. aaa|bbb|112 > 3. aaa|bbc|111 > 4. aaa|bbc|112 > > > regards > --- > kiru > > > -- > --- > To unsubscribe, send email to [EMAIL PROTECTED] > -- > --- > - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] multiple order by value bug?
Will Leshner írta: On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: This query works fine (I think my collate function too), but if I accomodate it with "ORDER BY szemely.nev,szemely.anyanev,kereset.datum", then sorting is in wrong order. Do you mean you have two "ORDER BY" clauses? Seems like that would be a syntax error, or, at best, undefined. No, I accomodate only te kereset.datum colum to the ORDER BY clause, and then the result come wrong. The two columns (szemely.nev,szemely.anyanev) collated by my func, and the third column that I accomodate is collated by the default sqlite func. I want to sort by szemely.nev and when szemely nev is equal, sort by szemely.anyanev. Then I would like to sort the result by kereset.datum. nev|anyanev|datum 1. aaa|bbb|111 2. aaa|bbb|112 3. aaa|bbc|111 4. aaa|bbc|112 regards --- kiru - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] multiple order by value bug?
On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: This query works fine (I think my collate function too), but if I accomodate it with "ORDER BY szemely.nev,szemely.anyanev,kereset.datum", then sorting is in wrong order. Do you mean you have two "ORDER BY" clauses? Seems like that would be a syntax error, or, at best, undefined. - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] multiple order by value bug?
Hi list, sqlite version: 3.3.8 I have 2 tables: --- CREATE TABLE kereset (realid INTEGER NOT NULL, id INTEGER NOT NULL, datum DATETIME, jogcim CHAR(1) NOT NULL, brutto INT NOT NULL, ado INT NOT NULL, adoalap INT NOT NULL); CREATE TABLE szemely (id INTEGER NOT NULL, nev VARCHAR(128) NOT NULL COLLATE MAGYAR, leanynev VARCHAR(128) COLLATE MAGYAR, anyanev VARCHAR(128) COLLATE MAGYAR, szulhely VARCHAR(128) COLLATE MAGYAR, szuldat DATETIME, adoszam VARCHAR(10), irszam INT, varos VARCHAR(64) COLLATE MAGYAR, cim VARCHAR(128) COLLATE MAGYAR, telefon VARCHAR(64), adoalap INT, adosav INT, szolgdij INT, torolve BOOLEAN DEFAULT FALSE); --- my query: --- SELECT szemely.nev, szemely.anyanev, szemely.szulhely, szemely.adoszam, kereset.datum,szemely.id FROM szemely,kereset WHERE (kereset.datum >= 19950101 AND kereset.datum <= 19951231) AND (szemely.nev >= '000' AND szemely.nev <= 'zzz') AND kereset.id = szemely.id ORDER BY szemely.nev,szemely.anyanev --- This query works fine (I think my collate function too), but if I accomodate it with "ORDER BY szemely.nev,szemely.anyanev,kereset.datum", then sorting is in wrong order. If you need it, I send my collate function. regards --- kiru - To unsubscribe, send email to [EMAIL PROTECTED] -