Kevin Waterson wrote:
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
Are you actually searching for membership in a class A, B or C network
or perhaps a subnet? If you are you can use the dotted format to your
advantage.
No, The search is for which registry owns the
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
> Are you actually searching for membership in a class A, B or C network
> or perhaps a subnet? If you are you can use the dotted format to your
> advantage.
No, The search is for which registry owns the block of IPs the that
Kevin Waterson wrote:
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
It looks as if you are looking to see if an address belongs to a
particular class B network. Are all your searches done that way?
If they are you may be able to use a regular expression to do your se
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
> It looks as if you are looking to see if an address belongs to a
> particular class B network. Are all your searches done that way?
>
> If they are you may be able to use a regular expression to do your search.
well, the r
Kevin Waterson wrote:
This one time, at band camp, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
I don't quite understand. To continue your example, exactly which IP
addresses are considered to fall into the range "65536"? How do you
figure 1.2.3.4 is in this range, if indeed it is?
The beggi
I would break each octet into separate fields then compare octet by octet
Kevin Waterson wrote:
How can I SELECT an IP within a range?
All my IP's are stored as 1.2.3.4 but I need to check if
each is within a range of long IP's.
Can this be done with SQLite? or do I need some sort of
external i
This one time, at band camp, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
> ip between '81.163.0.0' and '81.163.999.999'
This would require me know the value of the range before selecting.
The addittion of the IP plus the range is what gets me. How to
go about it?
Kind regards
Kevin
--
"Democra
Kevin Waterson <[EMAIL PROTECTED]> wrote:
This one time, at band camp, "Igor Tandetnik"
<[EMAIL PROTECTED]> wrote:
I don't quite understand. To continue your example, exactly which IP
addresses are considered to fall into the range "65536"? How do you
figure 1.2.3.4 is in this range, if indeed
This one time, at band camp, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
> I don't quite understand. To continue your example, exactly which IP
> addresses are considered to fall into the range "65536"? How do you
> figure 1.2.3.4 is in this range, if indeed it is?
The begging IP may be 81.163.0.
The way I am dealing with this is...
First convert the IP to a 32bit integer. (In the system it will
represented as a 32bit integer)
Store it in the database.
Perform the comparison operations on this stored data.
Thanks,
Lloyd
On Mon, 2006-12-04 at 22:07 -0500, Igor Tandetnik wrote:
> Kevin
Kevin Waterson <[EMAIL PROTECTED]> wrote:
This one time, at band camp, "Igor Tandetnik"
<[EMAIL PROTECTED]> wrote:
How is the range specified?
In the database the IP is 1.2.3.4 and the range is eg: 65536
I don't quite understand. To continue your example, exactly which IP
addresses are con
This one time, at band camp, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
> How is the range specified?
In the database the IP is 1.2.3.4 and the range is eg: 65536
Kind regards
Kevin
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contest
RB Smissaert <[EMAIL PROTECTED]>
wrote:
Thanks, that works.
Couldn't get it to work with an alias t1:
delete from table1 t1
where exists (
select * from table1 t2
where t1.fieldB = t2.fieldB and t1.OID <> t2.OID
Any what is wrong with that?
It's not a valid syntax for DELETE statement.
Al
Kevin Waterson <[EMAIL PROTECTED]> wrote:
How can I SELECT an IP within a range?
All my IP's are stored as 1.2.3.4 but I need to check if
each is within a range of long IP's.
How is the range specified?
Igor Tandetnik
---
How can I SELECT an IP within a range?
All my IP's are stored as 1.2.3.4 but I need to check if
each is within a range of long IP's.
Can this be done with SQLite? or do I need some sort of
external ip2long() function to throw at it?
Kind regards
kevin
--
"Democracy is two wolves and a lamb voti
Thanks, that works.
Couldn't get it to work with an alias t1:
delete from table1 t1
where exists (
select * from table1 t2
where t1.fieldB = t2.fieldB and t1.OID <> t2.OID
Any what is wrong with that?
Also it is a bit slow despite an index of fieldB. Any ideas how to speed
this up?
RBS
---
RB Smissaert <[EMAIL PROTECTED]>
wrote:
Trying to delete rows in a SQLite table where
One particular field has a duplicate value.
Tried this query, using a self-join:
DELETE
FROM
table1 t1 INNER JOIN table1 t2 ON
(t1.fieldB = t2.fieldB)
WHERE
t1.OID <> t2.OID
But I get an error near t1
dele
Trying to delete rows in a SQLite table where
One particular field has a duplicate value.
Tried this query, using a self-join:
DELETE
FROM
table1 t1 INNER JOIN table1 t2 ON
(t1.fieldB = t2.fieldB)
WHERE
t1.OID <> t2.OID
But I get an error near t1
Any suggestion what I am doing wrong here?
RBS
> You might want to check the records for the patients with DOB
> before 1900-01-01
Already taken care of that long time ago.
As said, I am more familiar with Excel than with SQLite, but catching up.
RBS
-Original Message-
From: Dennis Cote [mailto:[EMAIL PROTECTED]
Sent: 04 December 20
RB Smissaert wrote:
I am dealing with a clinical (patients) database and there are only 8
patients with a date of birth before 1900-02-28, so not a major problem.
Clinical data is all well after that. I will see what the speed penalty is
from doing the when then else and if it is small then apply
It is a very common algorithm. From memory it is implemenented in
Sqlite, for example.
[EMAIL PROTECTED] wrote:
can convert to seconds since start of epoch, do the arithmetic,
then convert back
Don't get you. It would be quite a calculation, with leap years etc.
RBS
On Sun, Dec 03, 2006
What are you using for compression?
Have you checked that you get a useful degree of compression on that
numeric data? You might find that it is not particularly amenable to
compression.
Hickey, Larry wrote:
I have a blob structure which is primarily doubles. Is there anyone with
some exper
They are in the same format as Interbase dates. Could there be a schema
error and they have been wrongly identified?
Can you transfer them to be ing correct date types in Interbase, then
you just use very conventional tools for your transfer?
[EMAIL PROTECTED] wrote:
Well, these fields I am
I am dealing with a clinical (patients) database and there are only 8
patients with a date of birth before 1900-02-28, so not a major problem.
Clinical data is all well after that. I will see what the speed penalty is
from doing the when then else and if it is small then apply it to the date
of bir
[EMAIL PROTECTED] wrote:
Great stuff.
For your information it needs to be:
julianday('1899-12-30')
Yes, that will accomplish the same thing.
There are really two issues, the fact that excel uses 1 (not 0) as the
serial number for 1900-01-01, and the fact that it incorrectly assumes
that
urse, I get it.
>> Haven't got it working though. Still the invalid use of null error.
>>
>>
> Bart,
>
> Here is what I get:
>
> SQLite version 3.3.5
> Enter ".help" for instructions
> sqlite> select
> ...
...> cast (
...> julianday(
...> substr(20061204, 1, 4) || '-' ||
...> substr(20061204, 5, 2) || '-' ||
...> substr(20061204, 7, 2)
...> ) - julianday('1900-01-01
insertion.
> Even more reason to use the original substring based version.
>
> select
> cast (
> julianday(
> cast(20061204 / 1 as integer) || '-' ||
> substr('00' || (cast(20061204 / 100 as integer) % 100), -
Hi Dennis,
Got this working now, great stuff and thanks!
Will do some testing to see what is faster and report back here.
RBS
> [EMAIL PROTECTED] wrote:
>> Thanks , will try that.
>> What is as excel_date?
>> Is this a variable or is this jus plain SQL against SQLite?
>>
>>
> Bart,
>
> excel_dat
numeric calculations don't insert leading zeros for months and days less
than 10. Here i sa modified version that does leading zero insertion.
Even more reason to use the original substring based version.
select
cast (
julianday(
cast(20061204 / 1 as in
> just a normal SQL alias name
Of course, I get it.
Haven't got it working though. Still the invalid use of null error.
RBS
> [EMAIL PROTECTED] wrote:
>> Thanks , will try that.
>> What is as excel_date?
>> Is this a variable or is this jus plain SQL against SQLite?
>>
>>
> Bart,
>
> excel_date
> can convert to seconds since start of epoch, do the arithmetic,
> then convert back
Don't get you. It would be quite a calculation, with leap years etc.
RBS
> On Sun, Dec 03, 2006 at 05:31:55PM +, RB Smissaert wrote:
>> Still have the problem though how to compare dates in SQLite when the
Tried it, but get the error invalid use of null.
The field I tried it on had no NULL values.
Will figure it out.
RBS
> RB Smissaert wrote:
>> When moving data from Interbase to SQLite I have to convert integer
>> dates in
>> the format mmdd to Excel dates. These are integer numbers counting
>
On Sun, Dec 03, 2006 at 05:31:55PM +, RB Smissaert wrote:
> Still have the problem though how to compare dates in SQLite when the format
> is the integer mmdd. Maybe I will need some custom SQLite function.
What's difficult about comparing integers of the form mmdd?
Comparing them is
[EMAIL PROTECTED] wrote:
Thanks, will try that.
What does the: % 100 do and what the Excel_date ?
The % is the modulus operator. It returns the remainder after division
by a number. For example, 1234 divided by 100 gives 12 and a remainder
of 34. The '/' division operator returns the quoti
On Sun, Dec 03, 2006 at 11:24:36PM -0600, John Stanton wrote:
> How about running a daemon on your machine which gets the request from
> your user defined function, does the lookup with a persistent connection
> and asynchronously updates the row in the DB? It does not need to be a
> daemon, it
[EMAIL PROTECTED] wrote:
Thanks , will try that.
What is as excel_date?
Is this a variable or is this jus plain SQL against SQLite?
Bart,
excel_date is just a normal SQL alias name for the complicated
expression. The string 'execl_date' will be returned as the name of this
result column.
Thanks, will try that.
What does the: % 100 do and what the Excel_date ?
RBS
> RB Smissaert wrote:
>> When moving data from Interbase to SQLite I have to convert integer
>> dates in
>> the format mmdd to Excel dates. These are integer numbers counting
>> the
>> days past 31 December 1899. Wi
Hi Dennis,
Thanks for the code, made me think of an alternate approach.
Tried out your code and made some changes. Here is the updated version
select strftime('%Y-%m-%dT%H:%M:%f', localtime) ||
case
when (strftime('%s',localtime) - strftime('%s',GMTTime)) > 0
then '+' || strftime('%H:%M
RB Smissaert wrote:
When moving data from Interbase to SQLite I have to convert integer dates in
the format mmdd to Excel dates. These are integer numbers counting the
days past 31 December 1899. With substr I can make it dd/mm/ (I am in
the UK and that is the normal way to format dates)
Hickey, Larry uttered:
I have a blob structure which is primarily doubles. Is there anyone with
some experience with doing data compression to make the blobs smaller?
No experience with compressing blobs...
Tests I have
run so far indicate that compression is too slow on blobs of a few
Thanks , will try that.
What is as excel_date?
Is this a variable or is this jus plain SQL against SQLite?
RBS
> RB Smissaert wrote:
>> When moving data from Interbase to SQLite I have to convert integer
>> dates in
>> the format mmdd to Excel dates. These are integer numbers counting
>> the
Hi RBS!
In my application I use following approach:
It is a part of view to export csv data to Excel:
CREATE VIEW v_export_data_std AS
SELECT localnumber, remotenumber, sipuser,
strftime( "%Y", timestart, 'unixepoch', 'localtime' ) AS
year,
strftime( "%m"
RB Smissaert wrote:
When moving data from Interbase to SQLite I have to convert integer dates in
the format mmdd to Excel dates. These are integer numbers counting the
days past 31 December 1899. With substr I can make it dd/mm/ (I am in
the UK and that is the normal way to format dates)
hi,
i've written a field-based compression using bzip2.
my experience: the fields must have at least 50 bytes, or the compressed
data is bigger !
cu, gg
Hickey, Larry schrieb:
I have a blob structure which is primarily doubles. Is there anyone with
some experience with doing data compression t
Dixon Hutchinson wrote:
I think this is a different question, unrelated to the previous
sqlite_open thread.
I'm in a WIN32 environment. I'm using:
h = CreateFile(path, GENERIC_READ, FILE_SHARE_READ ||
FILE_SHARED_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
to es
I have a blob structure which is primarily doubles. Is there anyone with
some experience with doing data compression to make the blobs smaller?
Tests I have
run so far indicate that compression is too slow on blobs of a few meg to
be practical.
I get now at least 20 to 40 inserts per second bu
Well, these fields I am talking about hold date information but they
have nil to do with dates in that you can't do any date manipulation
on the data. There also are proper date-time fields in the database and
they hold something entirely different.
The first field (with mmdd) hold a long data
> -Ursprüngliche Nachricht-
> Von: John Stanton [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 1. Dezember 2006 19:59
> An: sqlite-users@sqlite.org
> Betreff: Re: [sqlite] for what reason :memory: is much slower than
> /dev/shm/dummy.db
>
>
> Eduardo Morras wrote:
> > At 09:34 01/12/200
49 matches
Mail list logo