Обсуждение: Strange change in my where clause?
I have a select where I end like this: ...where week = 40 and year = 2004 order by trykkedato, presseID, godeaviser but the statement logged by the server is ...where week = 40 and year = 2004 order by 1,3,20 Why? The order get messed up.... Regards, BTJ -- ----------------------------------------------------------------------------------------------- Bjørn T Johansen btj@havleik.no ----------------------------------------------------------------------------------------------- Someone wrote: "I understand that if you play a Windows CD backwards you hear strange Satanic messages" To which someone replied: "It's even worse than that; play it forwards and it installs Windows" -----------------------------------------------------------------------------------------------
On Mon, 6 Dec 2004, [ISO-8859-1] Bjørn T Johansen wrote: > I have a select where I end like this: > > ...where week = 40 and year = 2004 order by trykkedato, presseID, godeaviser > > but the statement logged by the server is > > ...where week = 40 and year = 2004 order by 1,3,20 > I find this a little hard to believe. What logging option are you using? It certainly comes out as expected here with log_statement. Kris Jurka
Well, it may be my report tool that is changing the sql statement; I am just trying to figure out which one does the change... BTJ Kris Jurka wrote: > > On Mon, 6 Dec 2004, [ISO-8859-1] Bjørn T Johansen wrote: > > >>I have a select where I end like this: >> >>...where week = 40 and year = 2004 order by trykkedato, presseID, godeaviser >> >>but the statement logged by the server is >> >>...where week = 40 and year = 2004 order by 1,3,20 >> > > > I find this a little hard to believe. What logging option are you using? > It certainly comes out as expected here with log_statement. > > Kris Jurka >