Re: [sqlite] No error on selecting non-grouped column

2011-09-16 Thread Magnus Thor Torfason
On 9/14/2011 15:29, Jay A. Kreibich wrote: Most RDBMS systems will throw an error if you don't group or aggregate column references, but SQLite trust you to know what you're doing. Personally I've always found this to be very useful, as I often have queries that lead to great

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Jay A. Kreibich
On Thu, Sep 15, 2011 at 07:00:43AM +0800, Mohd Radzi Ibrahim scratched on the wall: > > On 15-Sep-2011, at 2:55 AM, Magnus Thor Torfason wrote: > > > > > I then ran a query grouping employees by job: > > > > > select ename, job from emp group by job; > > "ENAME", "JOB" > > == >

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Mohd Radzi Ibrahim
On 15-Sep-2011, at 2:55 AM, Magnus Thor Torfason wrote: > > I then ran a query grouping employees by job: > > > select ename, job from emp group by job; > "ENAME", "JOB" > == > "FORD", "ANALYST" > "MILLER", "CLERK" > "CLARK", "MANAGER" > "KING", "PRESIDENT" > "TURNER",

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Petite Abeille
On Sep 14, 2011, at 9:27 PM, Darren Duncan wrote: > Petite Abeille wrote: >> On Sep 14, 2011, at 8:55 PM, Magnus Thor Torfason wrote: >>> Now, I get a list of the jobs, and a random selection of employees. I would >>> have expected an error here. Of course, my actual query was different (this

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Jay A. Kreibich
On Wed, Sep 14, 2011 at 12:24:57PM -0700, Gerry Snyder scratched on the wall: > Would be pragma to reverse unordered selects show a different result? Very likely, yes. http://sqlite.org/pragma.html#pragma_reverse_unordered_selects -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H >

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Jay A. Kreibich
On Wed, Sep 14, 2011 at 02:55:06PM -0400, Magnus Thor Torfason scratched on the wall: > I have this database of employees. A simple select looks like this: > Now, I get a list of the jobs, and a random selection of employees. > I would have expected an error here. Of course, my actual query

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Darren Duncan
Petite Abeille wrote: On Sep 14, 2011, at 8:55 PM, Magnus Thor Torfason wrote: Now, I get a list of the jobs, and a random selection of employees. I would have expected an error here. Of course, my actual query was different (this is based on the Oracle example data base from very old days),

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Gerry Snyder
Would be pragma to reverse unordered selects show a different result? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Igor Tandetnik
On 9/14/2011 2:55 PM, Magnus Thor Torfason wrote: I then ran a query grouping employees by job: select ename, job from emp group by job; "ENAME", "JOB" == "FORD", "ANALYST" "MILLER", "CLERK" "CLARK", "MANAGER" "KING", "PRESIDENT" "TURNER", "SALESMAN" Now, I get a list of the

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Petite Abeille
On Sep 14, 2011, at 8:55 PM, Magnus Thor Torfason wrote: > Now, I get a list of the jobs, and a random selection of employees. I would > have expected an error here. Of course, my actual query was different (this > is based on the Oracle example data base from very old days), but it was also

[sqlite] No error on selecting non-grouped column

2011-09-14 Thread Magnus Thor Torfason
I have this database of employees. A simple select looks like this: > select ename, job from emp order by job; "ENAME", "JOB" == "SCOTT", "ANALYST" "FORD", "ANALYST" "SMITH", "CLERK" "ADAMS", "CLERK" "JAMES", "CLERK" "MILLER", "CLERK" "JONES", "MANAGER" "BLAKE",