2008/9/17 Bjorn Rauch <[EMAIL PROTECTED]>:
>> From: Simon Davies <[EMAIL PROTECTED]>> Date: 2008/9/16> Subject: Re:
>> [sqlite-announce] Foreign key .
.
.
.
> Yes, indeed it works this way. But I am executing these commands from a .NET
> application usin
2008/9/16 Aravinda babu <[EMAIL PROTECTED]>:
> Hi all,
>
.
.
.
> static const char *updateCmd = "UPDATE cert_store_table set lastRowFlag =
> :lastRowFlag where lastRowFlag = :lastRowFlag;" ;
> < same named parameter twice
>
.
.
.
> Is there any
Not sure about replacing the collation sequence - does not sound
easier than recreating the table.
You could just add a view:
sqlite> CREATE TABLE test_table (ID INTEGER PRIMARY KEY,
...> ExternalID2 INTEGER,
...> ExternalID INTEGER,
...>
Hi Dennis,
Declaring the column as integer does not prevent you from storing strings:
SQLite version 3.6.0
Enter ".help" for instructions
sqlite> BEGIN TRANSACTION;
sqlite> CREATE TABLE test_table (ID INTEGER PRIMARY KEY, ExternalID2 INTEGER,
...> ExternalID
...> INTEGER, Value INTEGER);
s
2008/7/29 Robert Citek <[EMAIL PROTECTED]>:
> On Tue, Jul 29, 2008 at 2:35 AM, <[EMAIL PROTECTED]> wrote:
>> On Tue, Jul 29, 2008 at 02:29:53AM -0500, Robert Citek wrote:
>>> $ sqlite3 -version
>>> 3.4.2
>>
>> On 3.4.0 and 3.5.9 here, the pure-SQL version is -much- faster than the shell
>> pipe. C
2008/7/25 Dave Gierok <[EMAIL PROTECTED]>:
> Does anyone know what endianness a Sqlite database is stored in? Or does
> that depend on the endianness of the machine it was created on? I am
> wondering because we ship a game that runs on Xbox 360, which uses the
> PowerPC architecture and has a
2008/7/22 Milton Centeno <[EMAIL PROTECTED]>:
> Hi,
>
> I'm new to sqlite. The command "sqlite3 test.db" and "sqlite3 ex1" as listed
> in the getting started guide on the website do not appear to work for me.
> What are the commands to simply create a database in sqlite and how to exit
> when in th
2008/7/22 Joanne Pham <[EMAIL PROTECTED]>:
> Hi All,
> I am current using sqlite 3.5.9 and below is command to get the data from my
> database as:
> .output '/opt/phoenix/monitor/exportData'
> .mode csv
> select '#Monitored applications' , group_concat(appName) from appMapTable;
> The
2008/7/14 Ralf <[EMAIL PROTECTED]>:
> I'm having problems with Inner Joins on m:n relations
>
> book <--> bookauthor <--> author
>
> SELECT authorname FROM author INNER JOIN book INNER JOIN bookauthor ON
> book.Id_book = bookauthor.Id_book ON author.Id_author = bookauthor.Id_author
> WHERE booklti
Hi Hartwig,
You have not specified how you are trying to build SQLite, but if you
are trying to build from the amalgamation then this link may be
relevant:
http://www.nabble.com/-DSQLITE_OMIT_TRIGGER-to18075526.html#a18075989
Rgds,
Simon
2008/7/4 Hartwig Wiesmann <[EMAIL PROTECTED]>:
> Hi,
>
> I
Hi Tim,
select count(*) from sqlite_master;
will return 0 on a brand new db
Rgds,
Simon
2008/7/3 Tim Streater <[EMAIL PROTECTED]>:
> Hi,
>
> I have a PHP script that I run in Terminal under OS X, which opens an sqlite
> db and works on it. Trouble is, if the db doesn't exist then the PHP libra
n detail?
>Thank you.
>
> James
> -Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Simon Davies
> Sent: Wednesday, June 25, 2008 4:40 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] NOT LIKE statement
>
entServer.
sqlite>
Rgds,
Simon
2008/6/25 James <[EMAIL PROTECTED]>:
> Hi,
> I will read that.
> But I want to know that is it possible to get the expected result?
> Thank you.
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
Hi James,
I think the problem lies with your expectations.
Read the section on the LIKE operator in http://www.sqlite.org/lang_expr.html
Rgds,
Simon
2008/6/25 James <[EMAIL PROTECTED]>:
> Hi,
>
> I execute the SQL statement [SELECT Name FROM tr069;] and get the result
>
> InternetGatewayDevice.
Christophe,
iso is a column in the subquery and in countries.
so:
select distinct * from (select * from Cities where name like
'dusseldorf%' union select * from Staedte where name like
'düsseldorf%') as sub, countries where sub.iso=countries.iso;
Regards,
Simon
2008/6/24 Christophe Leske <[EMA
Hi Gilles,
'like' is case-insensitive.
so:
select * from customers where city like "%ville%";
would match "villes" or "VilleS".
Rgds,
Simon
2008/6/20 Gilles Ganault <[EMAIL PROTECTED]>:
> Hello
>
> Is there a way for glob to be case-insensitive? I'd like to retrieve
> all rows where the city
It appears that any table beginning "sqlite_" provokes "SQL error:
object name reserved for internal use: sqlite_?" where ? is the text
following "sqlite_"
The articles you have referenced appear to be discussions of possible
future enhancements.
Rgds,
Simon
2008/6/13 Alexey Pechnikov <[EMAIL PR
http://www.sqlite.org/autoinc.html
Rgds,
Simon
2008/6/13 Kang Kai <[EMAIL PROTECTED]>:
> Hi,
>
> In an application I use the default 'rowid' column as identifier of objects
> stored in table.
>
> I found that if I delete the record that has the maximal rowid, the rowid
> will be reused when I i
Or in similar vein if you wish the shell to remain running:
C:\> sqlite3 tst.db ".read tst.cmd"
2008/6/13 Simon Davies <[EMAIL PROTECTED]>:
> Hi John,
>
> I don't think that the first command can combine meta-commands with
> SQL statements.
>
> But
Hi John,
I don't think that the first command can combine meta-commands with
SQL statements.
But redirect stdin:
C:\> copy con tst.cmd
create table if not exists tst( c1 integer );
insert into tst values( 0 );
insert into tst values( 1 );
insert into tst values( 2 );
.mode line
select c1 from ts
Hi Gary,
Does
SELECT DISTINCT category, subcategory from documents;
not provide what you want? If not you may need to be more specific.
Rgds,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/s
Andrea,
This appears to do what you want...
SQLite version 3.4.2
Enter ".help" for instructions
sqlite>
sqlite> create table tst( name text, score integer, info text );
sqlite> insert into tst values( 'A', 289, 'A1' );
sqlite> insert into tst values( 'C', 29, 'C1' );
sqlite> insert into tst value
Hi Markus,
http://www.sqlite.org/optoverview.html may help...
>From earlier performance discussions, ORs can prevent indices being
used - do your tables have indices?
Try "EXPLAIN QUERY PLAN " preceding your SELECTs to determine whether
indices are being used.
Rgds,
Simon
2008/6/4 Markus Wolte
2008/4/25 lrjanzen <[EMAIL PROTECTED]>:
>
> I have the following table
...
> and the following insert
> INSERT INTO Sighting (SpeciesID,LocationID,SightingDate,Note)
> VALUES (3005,22,'2/26/2008','New Note')
>
> the insert works EXCEPT the date keeps coming in as NULL! What am I doing
> wrong?
>
>
Alexander,
>From http://www.sqlite.org/c3ref/busy_handler.html
"The presence of a busy handler does not guarantee that it will be
invoked when there is lock contention. If SQLite determines that
invoking the busy handler could result in a deadlock, it will go ahead
and return SQLITE_BUSY or SQLIT
You need a placeholder in the SQL in order to bind a value.
The following is untested but shows the sort of approach...
Unsigned char u8_ClassificationCode=1;
Unsigned short u16_Input=0x0061;
if ( sqlite3_prepare(
gpst_SqliteInstance,
"SELECT id, Name FROM MUSIC WHERE Name >= '?'
Hi Bharath,
Works for me in 3.4.2
SQLite version 3.4.2
Enter ".help" for instructions
sqlite> create table tst( nun integer, nm text );
sqlite> insert into tst values( 23, 'A' );
sqlite> insert into tst values( 23, 'b' );
sqlite> insert into tst values( 24, 'C' );
sqlite> insert into tst values(
See "IF NOT EXISTS" in http://www.sqlite.org/lang_createtable.html
Rgds,
Simon
On 21/02/2008, Neville Franks <[EMAIL PROTECTED]> wrote:
> I need to create tables on the fly which will persist across sessions.
> These tables may or may not already exist.
>
> Calling sqlite3_exec( "create table ...
Hi Piotr,
Looks fine to me.
Isn't 123 the max weight for those rows with name 'C'?
Rgds,
Simon
On 04/02/2008, Piotr Budny <[EMAIL PROTECTED]> wrote:
> Hello,
> I've got strange behaviour, I want to select row ID of MAX(something) row for
> group:
>
> CREATE TABLE "test" ( "id" INTEGER , "name" C
On 18/01/2008, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote:
> ...and now the contents of $columns (SQL variable) in the statement above,
> has been replaced with the contents of $columns (TCL variable) - because the
> variable names are "compatible". So - that was my assumption - we've got now:
>
Prob shd be http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor
On 18/12/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> "Sreedhar.a" <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Say,I am having 4 entries in the table ALBUM.
> >
> > "CREATE TABLE ALBUM (AlbumtId INTEGER PRIMARY KEY NOT NU
Hi John,
initdb() does not modify the db handle in main().
Call should be:
err_c = initdb(&db);
and initdb prototype should be
int initdb(sqlite3** db)
etc...
Rgds,
Simon
On 11/12/2007, John Williams <[EMAIL PROTECTED]> wrote:
> I forgot to attach my sample code to my previous mess
Hi Doug,
I'm guessing that you expect your inserted values to be treated as a date.
BUT
sqlite> create table foo( d date null );
sqlite> insert into foo(d) values( '2008-01-01' );
sqlite> select d, typeof(d) from foo;
2008-01-01|text
http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions may
See http://www.nabble.com/SQLite-3.5.2---Unix---Memory-issue--tf4851124.html
Rgds,
Simon
On 29/11/2007, Alexandre Balaban <[EMAIL PROTECTED]> wrote:
> Hello,
>
> did someone recently tested the unix code with the locking
> style enabled ?
> I ask because I saw dubious code in this file, specifica
Hi Ged,
Compiled your snippet using VS2005 on XP, sqlite 3.4.2 -
ran to completion with no errors
Rgds,
Simon
PS Took nrly 2 hrs. Added "BEGIN" and "COMMIT" around insert loop,
reduced time to 10 seconds
On 27/11/2007, Ged Murphy <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi,
>
>
>
> I am doing some pr
Hi,
Statements will be in progress until you issue an sqlite_reset or
sqlite_finalize on them.
I don't know why rollback doesn't take care of this; perhaps someone
will explain,
Rgds,
Simon
On 23/11/2007, ??? <[EMAIL PROTECTED]> wrote:
> Hi all...
>
> Explain me something please. C
On 14/11/2007, Jevgenijs Rogovs <[EMAIL PROTECTED]> wrote:
> Sounds too complicated for this simple situation...
> Can anything be done w/o coding?
>
Why not change
INSERT INTO sometable VALUES ('blablabla\r\nyadayadayada');
into
INSERT INTO sometable VALUES ('blablabla
yadayadayada');
(real r
On 05/11/2007, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> Simon Davies
> wrote:
> > I use:
> >
> > select rowid, A, B, C
> > from t
> > where A||B||C in
> > ( select A||B||C
> > from t
> > group by A, B, C
> > having count(*)>1
On 05/11/2007, A.J.Millan <[EMAIL PROTECTED]> wrote:
> I All:
>
> Suppose a table:
>
> CREATE TABLE 'myTable' (
> A INTEGER NOT NULL,
> B INTEGER NOT NULL,
> C INTEGER);
>
> Do is there some query to return if there are some duplicate files and/or
> who are they?
>
> Consider duplicate file if ther
On 29/10/2007, Odekirk, Shawn <[EMAIL PROTECTED]> wrote:
> Adding "primary key" to column "a" results in the behavior I think you
> were first expecting.
>
> sqlite> create table tmp (a integer primary key, b integer);
> sqlite> create unique index tmpIndex on tmp (a, b);
> sqlite> insert into tmp
Thanks for the explanation!
On 29/10/2007, Dennis Cote <[EMAIL PROTECTED]> wrote:
> Simon Davies wrote:
> > Following this thread, I was experimenting with last_insert_rowid(),
> > and found the following, which does not look right:
> >
> > SQLite version 3.4.2
&
Hi All,
Following this thread, I was experimenting with last_insert_rowid(),
and found the following, which does not look right:
SQLite version 3.4.2
Enter ".help" for instructions
sqlite>
sqlite> create table tmp( a integer, b integer );
sqlite> create unique index tmpIndex on tmp( a, b );
sqlit
On 23/10/2007, Vijaya Lakshmi <[EMAIL PROTECTED]> wrote:
.
> sqlite.org and used the command line
>
> sqlite>sqlite old.db .dump | sqlite 3 new.db
> but after this nothing happens it just shows as below...
> >
Type the command at the operating system prompt, not whilst sqlite is
already runnin
On 09/10/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I got an error when I try to read some data outside the while{}, inside the
> while{} it's ok, an idea ?
> test.db have just one "table1" and a "field1" with values "one", "two",
> "three".
.
.
.
>const unsigned char *my
Hi Daan,
You could try this:
sqlite> CREATE TABLE foo(a integer, b integer, c integer, d integer,
...> unique (a, b) on conflict ignore);
sqlite> CREATE TRIGGER fooUnique before insert on foo
...> when exists (select a from foo where a=new.a and b=new.b)
.
On 08/10/2007, Daan van der Sanden <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is it possible to merge two rows with SQLite? Say I have the following table":
> CREATE TABLE foo(a integer, b integer, c integer, d integer);
> CREATE INDEX idx ON foo(a,b);
>
> With the following data:
>
> INSERT INTO foo VAL
On 25/09/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Hi Simon,
.
.
> Here I
> need to find the number of distinct combinations of year, month not the
> count for a particular year, month.
>
> Regards,
> Phani
>
SQLite version 3.4.2
Enter ".help" for instructions
sqlite>
sqlite> create tabl
On 25/09/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
.
.
> Assume you have a following data:
>
> matchNo, year, month
>
> 34 2007 9
>
> 27 2006 5
>
> 26 2006 5
>
> Now distinct year, month will return
>
> 2007, 9
>
> 2006, 5
>
> Is there a way by which I ca
Hi All,
Is this expected behaviour (pre-compiled windows binary)?
SQLite version 3.4.2
Enter ".help" for instructions
create table monthNames( shortName TEXT, longName TEXT );
insert into monthNames values( 'Jan', 'January' );
insert into monthNames values( 'Feb', 'February' );
insert into monthN
Hi Frank,
On 3.4.2 built from amalgamation on XP using Visual Studio I can
follow your scenario without problems. I used command line shell and
tcl shell.
More detail will help (version etc).
Rgds,
Simon
On 13/09/2007, Frank Fiedler <[EMAIL PROTECTED]> wrote:
> Hello everybody,
>
> I have a pro
rather than C++ (it probably was doing that anyway),
but again with the same result.
Rgds,
Simon
On 05/09/07, Nuno Lucas <[EMAIL PROTECTED]> wrote:
> On 9/5/07, Simon Davies <[EMAIL PROTECTED]> wrote:
> [...]
> > in sqlite3VdbeMemStringify.
> > This resolves down to call
Hi All,
Here's my 2p...
on XP and VC++ (for my sins!)
The round function works.
sqlite_column_double() returns 98926650.5
The '01' on the end is introduced by calling sqlite_column_text
(in shell.c).
This results in reaching the line
sqlite3_snprintf(NBFS, z, "%!.15g", pMem->r);
in sq
On 02/09/07, C M <[EMAIL PROTECTED]> wrote:
> Hi, I'm very new to SQLite, and I'm using it with Python.
>
> I want to have queries that will match dates but not care about times.
.
.
.
Hi,
If your dates are stored in julian day (real) format, then the
fractional part will indicate the time of day
On 31/08/2007, Babu, Lokesh <[EMAIL PROTECTED]> wrote:
> I was trying the following piece of code (see below),
>
> The requirement here is very simple, I want the t_id field or ROWID
> field to be regenerated sequentially even after delete has been
> performed.
>
Hi Lokesh,
You can achieve this
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Simon,
>Yeah you can term the problem like that. Can't I use the
> function which is assigning a unique id for INTEGER PRIMARY KEY column
> inside sql? If yes, how to use it?
>
> Regards,
> Phani
>
Phani,
With the whole of the s
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Simon,
>
> > Without knowing your design, it looks like you wish to be able to
> > determine type from the id. This is creating a problem. Can you not
> > store the type separately from the id?
>
> Why is this creating a problem?
> No it'
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Hi Simon,
>The problem is I have rowid which is the PRIMARY Key, and
> another column puid which should be unique. Now when I do vacuum rowid
> changes, but puid doesn't change and I don't want puid to change. Now it
> is possible
Hi Phani,
What is the point of generating a unique integer separate from the
(unique) integer primary key?
If you use the primary key as your unique identifier, sqlite will take
care of locating unused (deleted) ids when the maximum value is
reached (according to the documentation; I have not tri
ragha,
you want something to give you a 'best match'. The 'like' operator in
the way you are using it does not do that, but it IS working as it
should.
I am not sure how to make it any clearer.
Rgds,
Simon
On 29/08/2007, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Pls see my last
> This email and its attachments contain confidential information from HUAWEI,
> which is intended only for the person or entity whose address is listed
> above. Any use of the information contained herein in any way (including, but
> not limited to, total or partial disclosure, reproduction, or dissemination)
> by persons other than the inten
On 29/08/2007, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote:
>
> select * from test where '982' like t || '%' order by t desc limit 1;
>
> This works but will not work for earlier data(9854002656).So seems to be bug.
>
> regards
> ragha
'9854002656%' is not a match for '982', so seems not to be a
Hi Graham,
The trigger needs a where clause, as in the following:
sqlite>
sqlite> create table temp( id integer primary key,
...> interested integer,
...> val1 text,
...> val2 text,
...>
Hi Tom,
Here's a less gruesome version - no cases. I've given no thought to
performance comparisons.
C:\Joinerysoft\JMS\dev\trunk> sqlite3 tst.db
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> insert into List values( 'a' );
sqlite> insert into List values( 'a' );
sqlite> insert int
Hi Tom,
Its a pretty gruesome bit of sql...
C:\Joinerysoft\JMS\dev\trunk> sqlite3 tst.db
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> create table List( Code text );
sqlite> insert into List values( 'a' );
sqlite> insert into List values( 'a' );
sqlite> insert into List values( 'a
Hi John,
> Folks are dumb where I come from; can someone please explain how this
> could be correct?
I don't know where you come from, so I can't help you.
:-)
sorry,
Simon
-
To unsubscribe, send email to [EMAIL PROTECT
Updating Igor's suggestion, just remove 'temp' from the line
create temp table image_temp as select * from file_folder_data;
For me .dump then works as expected.
Rgds,
Simon
On 17/08/07, Andre du Plessis <[EMAIL PROTECTED]> wrote:
> Hi Dennis this seems like a good idea, but there is a problem:
>
Andre,
C:\Joinerysoft\JMS\dev\trunk>sqlite3 tst.db
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> create table tmp( id integer, name text );
sqlite> insert into tmp values( 1, 'some name' );
sqlite> insert into tmp values( 2, 'some name' );
sqlite> insert into tmp values( 3, 'some nam
Hi Ragha,
C:\Joinerysoft\JMS\TestArea>sqlite3 tst.db
SQLite version 3.4.0
Enter ".help" for instructions
sqlite>
sqlite> create table tst( c1 integer, c2 test );
sqlite> insert into tst values( 1, '44' );
sqlite> insert into tst values( 2, '442' );
sqlite> insert into tst values( 3, '4454' );
sql
301 - 368 of 368 matches
Mail list logo