On Mon, Jul 13, 2009 at 10:33:00PM -0400, Pavel Ivanov scratched on the wall:
> Jay, you're pretty much mistaken:
>
> > I'm pretty sure you don't want to do it this way. What this does is
> > gather every row that meets the WHERE condition and then runs a max()
> > or min() aggregation
On 14/07/2009 11:44 AM, Jay A. Kreibich wrote:
> On Mon, Jul 13, 2009 at 07:40:48PM -0400, Wes Freeman scratched on the wall:
>> Yeah, sorry about that. In two statements:
>>
>> select max(number) from table where number < ?
>> select min(number) from table where number > ?
>
> I'm pretty sure
Jay, you're pretty much mistaken:
> I'm pretty sure you don't want to do it this way. What this does is
> gather every row that meets the WHERE condition and then runs a max()
> or min() aggregation function across all of those rows. That means
> that even if the column "number" has an
On Mon, Jul 13, 2009 at 07:40:48PM -0400, Wes Freeman scratched on the wall:
> Yeah, sorry about that. In two statements:
>
> select max(number) from table where number < ?
> select min(number) from table where number > ?
I'm pretty sure you don't want to do it this way. What this does is
Thank you, seems like a good solution.
Best regards,Bogdan
> From: freeman@gmail.com
> Date: Mon, 13 Jul 2009 19:40:48 -0400
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] range enclosing a number
>
> Yeah, sorry about that. In two statements:
>
> select max(number) from table
On 14 Jul 2009, at 12:16am, Bogdan Nicula wrote:
> Given a column containing numbers, which is the most efficient
> manner to find out the highest smaller and lowest greater number?
> That is, is there a better way than:
>
> select * from table where number <= ? order by number desc limit 1;
>
On 14 Jul 2009, at 12:49am, John Machin wrote:
> On 14/07/2009 3:04 AM, Simon Slavin wrote:
>>
>> The reference you were pointed to explains what happens:
>>
>> http://www.sqlite.org/datatype3.html#affinity
>>
>> So you want 'TEXT' ... 'char' doesn't mean anything to SQLite.
>
> @Simon: I'm not
On 14/07/2009 3:04 AM, Simon Slavin wrote:
> On 13 Jul 2009, at 4:35pm, Wilfried Mestdagh wrote:
>
>> But the circumstances are not really described (possible I cannot read
>> between the lines as my English is not perfect). So as far as I
>> understand
>> the page if I want to store / retrieve
Yeah, sorry about that. In two statements:
select max(number) from table where number < ?
select min(number) from table where number > ?
if you want to merge them into a single statement, you can do:
select (select max(number) from table where number < ?)
highest_smaller, (select min(number)
Thank you for your answer.
Looking back to my original email, I believe I didn't explain well enough: I
want to find the highest smaller and lowest greater numbers enclosing the
number.
For example, given the sequence: 1, 3, 5, 7, 9, etc., if I query for 6, I would
like to get 5 and 7.
Sorry, I misread the question...
Still, I think min/max are better than order by limit 1.
Wes
On Mon, Jul 13, 2009 at 7:24 PM, Wes Freeman wrote:
> Select max(number), min(number) from table;
>
> Wes
>
> On Mon, Jul 13, 2009 at 7:16 PM, Bogdan Nicula
Select max(number), min(number) from table;
Wes
On Mon, Jul 13, 2009 at 7:16 PM, Bogdan Nicula wrote:
>
>
> Hi,
>
> Sorry for my lack of SQL knowledge which triggered this help request:
> Given a column containing numbers, which is the most efficient manner to find
> out
Hi,
Sorry for my lack of SQL knowledge which triggered this help request:
Given a column containing numbers, which is the most efficient manner to find
out the highest smaller and lowest greater number?
That is, is there a better way than:
select * from table where number <= ? order by number
Hi,
if I attach a database to itself the trigger in the second db seem not
to work as expected (as I wrongly expected? .-): Does anyone no why and
how I could work around this?
sqlite3 adb
.headers on
create table a (
pk integer primary key );
create table b (
pk integer
On Sun, 12 Jul 2009 18:03:14 -0700, "Jim Showalter"
wrote:
>Schema:
>
>create table words (_id integer primary key autoincrement, wordtext
>text not null unique);
>
>create table definitions (_id integer primary key autoincrement,
>owningWordId integer not null unique,
Bruce Robertson wrote:
>> We use a system of updating an Sqlite database buit use port 80 to send
>> data in XML format.
>>
>> Is there a reason you have access to the email port and not the HTTP
>> port 80? It is very complex to identify a missing email but using port
>> 80 and HTTP the process
Anyone here on the list have experience with either app?
Thanks,
Monte
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On 13 Jul 2009, at 4:35pm, Wilfried Mestdagh wrote:
> But the circumstances are not really described (possible I cannot read
> between the lines as my English is not perfect). So as far as I
> understand
> the page if I want to store / retrieve a string (which can be a
> numeric
> string) I
Wilfried Mestdagh wrote:
> Hi Dan,
>
> Thank you for your reply. I read:
>
>
>> Under circumstances described below, the database engine may convert
>> values between numeric storage classes (INTEGER > and REAL) and
>> TEXT during query execution
>>
>
> But the circumstances are not really
Hi Dan,
Thank you for your reply. I read:
> Under circumstances described below, the database engine may convert
> values between numeric storage classes (INTEGER > and REAL) and
>TEXT during query execution
But the circumstances are not really described (possible I cannot read
between the
--
This message has been scanned for viruses and
dangerous content by Pinpoint, and is
believed to be clean.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
chandan wrote:
> I would like to know how to store images inside a SQLite database
> using the SQLite command line program.
You can't, really. You'd have to write your own application to handle
such BLOBs.
> consider the following example:
>
> create table img_tbl (
> img_id int primary
liubin liu wrote:
> 1.)How does sqlite3's select work?
It works well. What specifically do you want to now?
> Does it need to seach for all the records?
Sometimes. Other times, it could use indexes to reduce the number of
records a statement needs to look at. See:
On Sun, Jul 12, 2009 at 11:00 PM, tetragon tetragon wrote:
> create table words (_id integer primary key autoincrement, wordtext text not
> null unique, timestamp integer not null);
>
> public class Word
> {
> long _id;
> String wordtext;
> long timestamp;
> }
>
create table words (_id integer primary key autoincrement, wordtext text not
null unique, timestamp integer not null);
public class Word
{
long _id;
String wordtext;
long timestamp;
}
timestamp:
before save: 1247435151517
after save : 1247435160847
Why is it doing this?
My problem is get a "database is locked" error using lastest linux kernel
(above 2.6.28) , while the code can run smoothly on linux 2.6.26.2
kernel(vmware pc686 host) and on 2.6.26.3 kernel(arm9 embed system).
The problem code is:
#if 1
if (sqlite3_exec(gJcDb, "PRAGMA cache_size = 4000",
On Jul 13, 2009, at 3:38 PM, Wilfried Mestdagh wrote:
> Hi,
>
> It seems that if I create the table as a field type 'char' instead of
> 'string' then the issue is solved. But I thought the field type was
> of non
> importance?
Details here:
http://www.sqlite.org/datatype3.html#affinity
Hi,
It seems that if I create the table as a field type 'char' instead of
'string' then the issue is solved. But I thought the field type was of non
importance?
rgds, Wilfried
2009/7/13 Wilfried Mestdagh
> Hello,
>
> I'm using sqlite3.dll and Delphi 7. In certain
--
This message has been scanned for viruses and
dangerous content by Pinpoint, and is
believed to be clean.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Hello,
I'm using sqlite3.dll and Delphi 7. In certain cirumstances a string seems
to be converted to a number. To test I use SQLiteSpy from Ralf Junker wich
is a nice tool.
When I do this:
insert into Queue (NetworkID) values ("200907130833123740007")
Then the result of the field NetworkID is:
1.)How does sqlite3's select work?
Does it need to seach for all the records?
2.)Is there any relation between errno and the sqlite3's result code?
--
View this message in context:
Hi,
I would like to know how to store images inside a SQLite database
using the SQLite command line program.
consider the following example:
create table img_tbl (
img_id int primary key,
img blob);
In the above case how do I use the SQL "insert" statement to store
images into the
32 matches
Mail list logo