how do I add a constraint to a column so neither null nor empty
strings ("") are allowed?
--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
* Dennis Cote <[EMAIL PROTECTED]> [2007-02-03 01:30]:
> If you wanted to model what the insert or ignore is doing more
> directly, you could do something like this.
>
> rowid = select rowid from Strings where value = 'foo';
> if rowid is null then
>insert into Strings values ('foo');
>
--- "Anderson, James H (IT)" <[EMAIL PROTECTED]> wrote:
> The following works fine in sybase, but because in sqlite "update" does
> not support "from" it doesn't work. Is there another way of doing this?
>
> Thanks,
>
> Jim
>
> update C1_credDerivEvent
>set CDEvent = a.CDEvent || ',' ||
- Original Message -
From: "Rich Shepard" <[EMAIL PROTECTED]>
But, if you're going to do much with SQLite, I strongly recommend
Mike
Owens' "The Definitive Guide to SQLite" by Apress. The index is
shamefully
bad, but the book is a gem and has been a great help to me. Very
highly
Shane Harrelson wrote:
Yes, I could do that, but the point of this thread was to find someway
around doing the subsequent SELECT on a constraint collision during an
INSERT into the strings table.
I'm using the C API, and looking at the internals of the VBDE, the
rowid responsible for the
On Fri, 2 Feb 2007, Anderson, James H (IT) wrote:
The following works fine in sybase, but because in sqlite "update" does
not support "from" it doesn't work. Is there another way of doing this?
Jim,
I'm in the midst of trying to meet a deadline, so I'll let someone more
knowledgable
The following works fine in sybase, but because in sqlite "update" does
not support "from" it doesn't work. Is there another way of doing this?
Thanks,
Jim
update C1_credDerivEvent
set CDEvent = a.CDEvent || ',' || b.CDEvent
from C1_credDerivEvent a,
C1_tmp_credDerivEvent b,
On 2/2/07, Dennis Cote <[EMAIL PROTECTED]> wrote:
Shane Harrelson wrote:
> On 2/2/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote:
>> * Nicolas Williams <[EMAIL PROTECTED]> [2007-02-01 00:10]:
>> > Sounds like you should want to use INSERT OR IGNORE ... INTO
>> > Strings and then SELECT the rowid of
Shane Harrelson wrote:
On 2/2/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote:
* Nicolas Williams <[EMAIL PROTECTED]> [2007-02-01 00:10]:
> Sounds like you should want to use INSERT OR IGNORE ... INTO
> Strings and then SELECT the rowid of the string for use in
> INSERTing INTO Object.
That was my
Anderson, James H (IT) wrote:
Sybase supports "select into" but sqllite does not seem to. Here's a
sybase example:
select distinct CDId, CDEvent
into credDerivEvent
from credDerivOrig
This query creates the table credDerivEvent. Is there anythin comparable
in sqlite?
Thanks,
jim
Perfect! Thanks.
-Original Message-
From: Gerry Snyder [mailto:[EMAIL PROTECTED]
Sent: Friday, February 02, 2007 5:28 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] "select into" ?
Anderson, James H (IT) wrote:
> Sybase supports "select into" but sqllite does not seem to. Here's
Anderson, James H (IT) wrote:
Sybase supports "select into" but sqllite does not seem to. Here's a
sybase example:
select distinct CDId, CDEvent
into credDerivEvent
from credDerivOrig
This query creates the table credDerivEvent. Is there anythin comparable
in sqlite?
How about
CREATE
"select into" creates the table; "insert into" requires that the table
already exist.
-Original Message-
From: Jeff Godfrey [mailto:[EMAIL PROTECTED]
Sent: Friday, February 02, 2007 5:12 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] "select into" ?
> - Original Message -
- Original Message -
From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
Sybase supports "select into" but sqllite does not seem to. Here's a
sybase example:
select distinct CDId, CDEvent
into credDerivEvent
from credDerivOrig
This query creates the table credDerivEvent. Is there
Sybase supports "select into" but sqllite does not seem to. Here's a
sybase example:
select distinct CDId, CDEvent
into credDerivEvent
from credDerivOrig
This query creates the table credDerivEvent. Is there anythin comparable
in sqlite?
Thanks,
jim
If you are just looking for a simple detection, a process could "touch" or
update a flag file, which might be empty or whatever.
I have not seen the C API. I am not sure about the scope or effort.
But, there could be other methods. One might be to "mark" records with
pending / changed
Hi Cesar,
you can find what you are seeking in the CVS repository:
1) log in as anonymous:
cvs -d :pserver:[EMAIL PROTECTED]:/sqlite login
password: anonymous
2) checkout the current version
cvs -d :pserver:[EMAIL PROTECTED]:/sqlite checkout sqlite
3) Enter the sqlite directory:
cd sqlite
On 2/2/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote:
* Nicolas Williams <[EMAIL PROTECTED]> [2007-02-01 00:10]:
> Sounds like you should want to use INSERT OR IGNORE ... INTO
> Strings and then SELECT the rowid of the string for use in
> INSERTing INTO Object.
That was my first thought as well.
* Nicolas Williams <[EMAIL PROTECTED]> [2007-02-01 00:10]:
> Sounds like you should want to use INSERT OR IGNORE ... INTO
> Strings and then SELECT the rowid of the string for use in
> INSERTing INTO Object.
That was my first thought as well. Does SQLite return the row’s
last_insert_id correctly
Scott Hess wrote:
On 2/2/07, Dennis Cote <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
> The problem is, not many network filesystems work correctly.
I'm sure someone knows which versions of NFS have working file locking,
at least under Linux.
I doubt it is this easy. You need to line
The trouble always starts before I deal with the array, so I am sure that
the trouble is not there.
There are only 2 places where I have seen the trouble occur:
1. When I call sqlite_get_table
2. When I assign the array produced by sqlite_get_table to the wrapper
function.
Yes, this is a
On 2/2/07, Dennis Cote <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
> The problem is, not many network filesystems work correctly.
I'm sure someone knows which versions of NFS have working file locking,
at least under Linux.
I doubt it is this easy. You need to line up a bunch of
I just try-out on http://www.sqlite.org/sqlite-1.0.18.tar.gz and doesn't
work... please if any body have the source.. I really need it.. thanks to
all
On 02/02/07, Cesar Rodas <[EMAIL PROTECTED]> wrote:
I am wondering if there is a place on the net that I could download all
the
version of
The function ArrayToSheet has nil to do with SQLite and I left that out.
Ah, but that's where you access the variant array. That can be tricksy. Do
you always access that variant array (arr) in the range (0 To NumRecords, 0
To NumColumns - 1) where the row arr(0, *) holds the column names,
Dixon Hutchinson
wrote:
I am having a problem with single quotes in a C program.
Consider a simple table
CREATE TABLE t(comp TEXT);
Lets say I use sqlite3_prepare to prepare the following string:
"SELECT rowid FROM table WHERE comp=?;"
Shouldn't that be
SELECT rowid FROM t WHERE comp=?;
I am having a problem with single quotes in a C program.
Consider a simple table
CREATE TABLE t(comp TEXT);
Lets say I use sqlite3_prepare to prepare the following string:
"SELECT rowid FROM table WHERE comp=?;"
And then I call sqlite3_bind_text to bind "abc'def" to the statement.
And
FWIW, I'm not convinced Samba has locking working correctly. Using a very
recent Samba version, I managed to corrupt a SQLite database last fall by (I
think) doing simultaneous writes from the Linux host box, and my WinXP client
box (via a SMB drive map). I'm guessing the XP writes started
I am wondering if there is a place on the net that I could download all the
version of sqlite?
I mean sqlite v1.x.x, sqlite v2.x.x
I really want the 1.x.x becouse the code is easier to understand, and is
simplest that the sqlite3
--
Cesar Rodas
http://www.sf.net/projects/pagerank (The
Dennis Cote wrote:
[EMAIL PROTECTED] wrote:
The problem is, not many network filesystems work correctly.
Hi All,
If my understanding of this is correct, SQLite only requires that the
network file system has; reliable data transport and working file
locking. This has primarily been an issue
- Original Message -
From: "Guy Hachlili" <[EMAIL PROTECTED]>
To:
Sent: Friday, February 02, 2007 10:13 AM
Subject: RE: [sqlite] How do I know sqlite_get_table is finished
In any case, I've worked a bit on the function, and here's the result:
Thanks alot.
[EMAIL PROTECTED] wrote:
The problem is, not many network filesystems work correctly.
Hi All,
If my understanding of this is correct, SQLite only requires that the
network file system has; reliable data transport and working file
locking. This has primarily been an issue on older
Thanks for that, will have a look at the altered C code, but not sure
yet if I can compile. Just have never done it yet.
As I posted earlier I think I have found the trouble.
Due to a simple typo I enclosed the queries in that table SQL in
double quotes, where it should have been single quotes.
Hello.
At 14:32 2/2/2007 +, you wrote:
lReturnedRows is one of the function arguments, so that is fine.
I have made some progress though and that is that this problem only occurs
with this particular table, called SQL. It is a table that logs all the SQL
statements that run in my app. When
Thanks for the offer.
I think I just figured what the trouble was.
The query in that table should be enclosed in single quotes as it is
a TEXT field. Instead though I had enclosed it in double quotes, so I did
chr(34) & strQuery & chr(34) instead of:
chr(39) & strQuery & chr(39)
Had to go to
"Jeff Godfrey" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm working on a tcl/sqlite based app. For the first time, I
> just registered a callback with the trace method so I could "see"
> all of my SQL interactions as they happen. While it does work as
> advertised, it seems to output each SQL
As I see it you have only 3 options.
1. Polling.
Polling on a table in sqlite or depending upon your app. You could simply
check the file access modifiers to see when the last modifaction time was.
2. Set up an IPC semaphore
3. Set up a socket.
David GIGUET <[EMAIL PROTECTED]>
If you want to email me a copy of the table I'd be more than happy to try
running it here and see what happens. You can send it to epankoke @ gmail dot
com.
--
Eric Pankoke
Founder / Lead Developer
Point Of Light Software
http://www.polsoftware.com/
-- Original message
Hi All,
I'm working on a tcl/sqlite based app. For the first time, I just registered a
callback with the trace method so I could "see" all of my SQL interactions as
they happen. While it does work as advertised, it seems to output each SQL
statement prior to having resolved any variables
lReturnedRows is one of the function arguments, so that is fine.
I have made some progress though and that is that this problem only occurs
with this particular table, called SQL. It is a table that logs all the SQL
statements that run in my app. When I instead make this for example
sqlite_master
Hi Jay,
or better yet, I expected this to work, using the modulo operator %:
SELECT x - x % 1;
Isn't that evaluated left to right?
x-x = 0
0 %1 = 0
I don't think so. Well, yes, it is generally evaluated left to right,
but mod has precedence of minus, so it gets evaluated first. So even
I'll admit I'm not much of a C expert, so I'd say Guy has a much better handle
on that part than I do. As far as your code goes I only had one thought, and
forgive me if this is just my ignorance of VBA. I didn't see a declaration for
lReturnedRows anywhere. If you don't declare a variable,
On 1/31/07, T <[EMAIL PROTECTED]> wrote:
or better yet, I expected this to work, using the modulo operator %:
SELECT x - x % 1;
Isn't that evaluated left to right?
x-x = 0
0 %1 = 0
--
--
The PixAddixImage Collector suite:
http://groups-beta.google.com/group/pixaddix
SqliteImporter and
Jim Dodgen wrote:
Ha!!
Indeed ;)
Firefox warns that the page is a forgery and DNS fails so it's already
been zapped.
Martin
-
To unsubscribe, send email to [EMAIL PROTECTED]
Thanks for looking at that.
The crash can happen at the actual call to sqlite_get_table or it can
happen when I assign the resulting array to the wrapper function, so when
I do: GetFromDB = arr
Yes, I would be interested in making a boolean (optional) argument in
sqlite_get_table that can leave
Hi,
Iam working on the design of a multi-process architecture accessing a
single database. Is there a way for one of the process to detect that
another process has modified the database ? I would like to avoid regular
polling of the database to check for modifications and I also would like
to
At 07:44 2/2/2007 +, you wrote:
Sure, here it is:
Looking at the C code published at
http://www.tannertech.net/sqlite3vb/index.htm , it seems very risky - there
are a lot of places it can fail to allocate memory (for example), and the
use of some variables looks like it could randomly
46 matches
Mail list logo