Re: [sqlite] confusing with how to to this in sqlite

2009-01-19 Thread Rachmat Febfauza
: "Griggs, Donald" <donald.gri...@allscripts.com> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Tuesday, December 30, 2008 2:52:11 AM Subject: Re: [sqlite] confusing with how to to this in sqlite -Original Message- From: sqlite-us

Re: [sqlite] confusing with how to to this in sqlite

2008-12-29 Thread Griggs, Donald
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Rachmat Febfauza Sent: Sunday, December 28, 2008 9:13 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] confusing with how to to this in sqlite thanks simon

Re: [sqlite] confusing with how to to this in sqlite

2008-12-28 Thread Rachmat Febfauza
thanks simon for the explanation. after holiday, i works on how to optimize my query. actually awal1 table consist 12000 rows and akhir1 too. how to improve performance? i added index on table awal1 and akhir1 with following syntax : create index awal1i1 on

Re: [sqlite] confusing with how to to this in sqlite

2008-12-23 Thread Simon Davies
2008/12/23 Rachmat Febfauza : > = > > thanks to Simon. it works. but i have some question. i hope u can help me > to explain these : > > 1. is it necessary or not to specify min(awal1.begin). No. "Begin" is part of the 'group by' clause. Each distinct

Re: [sqlite] confusing with how to to this in sqlite

2008-12-22 Thread Rachmat Febfauza
= Without the group by clause the result set is: sqlite> select awal1.Code, awal1.Level, awal1.Category, awal1.Product, awal1.Location, awal1."Begin",akhir1."End", strftime("%s",akh ir1."End")-strftime("%s",awal1."Begin") as Difference from awal1, akhir1 where awal1.Code =

Re: [sqlite] confusing with how to to this in sqlite

2008-12-21 Thread Simon Davies
2008/12/21 Rachmat Febfauza : > > It looks like you are using the sqlite3 shell, so experiment with .separator > > Have you used .help? > > Rgds, > Simon > > > yes i am using sqlite3 shell, i mean not to make display like mysql does, but > the difference column that i want

Re: [sqlite] confusing with how to to this in sqlite

2008-12-21 Thread Rachmat Febfauza
It looks like you are using the sqlite3 shell, so experiment with .separator Have you used .help? Rgds, Simon yes i am using sqlite3 shell, i mean not to make display like mysql does, but the difference column that i want like mysql does. take a look at this different

Re: [sqlite] confusing with how to to this in sqlite

2008-12-20 Thread P Kishor
On 12/20/08, Simon Davies wrote: > 2008/12/20 Rachmat Febfauza : > > > > > i have to change 'FOOD ' to 'FOOD', but the result is not that i hope. > > > > Rachmat: If what Simon says is correct (and I have no reason to doubt > > it) you

Re: [sqlite] confusing with how to to this in sqlite

2008-12-20 Thread Simon Davies
2008/12/20 Rachmat Febfauza : > > i have to change 'FOOD ' to 'FOOD', but the result is not that i hope. > > Rachmat: If what Simon says is correct (and I have no reason to doubt > it) you might also get your query to work by specifying a collating > sequence of RTRIM on the

Re: [sqlite] confusing with how to to this in sqlite

2008-12-19 Thread Rachmat Febfauza
> The result should not be as you are expecting because column category > in table awal1 contain values 'FOOD' and column category in table > akhir1 contains values 'FOOD ' (an additional space character). If the > category columns (containijng 'FOOD') contain exactly the same text > then you

Re: [sqlite] confusing with how to to this in sqlite

2008-12-19 Thread D. Richard Hipp
On Dec 19, 2008, at 9:06 PM, Simon Davies wrote: >> >> how to make result like i hope? > > The result should not be as you are expecting because column category > in table awal1 contain values 'FOOD' and column category in table > akhir1 contains values 'FOOD ' (an additional space character). If

Re: [sqlite] confusing with how to to this in sqlite

2008-12-19 Thread Simon Davies
2008/12/20 Rachmat Febfauza : > I have problem with executing this query in sqlite. to reconstruct problem > please follow the following steps. > > > 1. create table awal1, akhir1 and hasil1 first. > > CREATE TABLE awal1(Code char(5),Level varchar(8), Category varchar(50), >