I have a project that compiles SQLite with the following options:
-DSQLITE_SECURE_DELETE=1
-DSQLITE_THREADSAFE=1
-DSQLITE_CORE=1
-DSQLITE_ENABLE_FTS3=1
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1
-DSQLITE_DEFAULT_PAGE_SIZE=32768
-DSQLITE_MAX_DEFAULT_PAGE_SIZE=32768
2012/4/2 YAN HONG YE :
> when I run this following code , the html file encoding changed to
> GB2312,not utf-8, I don't know why?
> system("echo ^ >mm.html");
> system("sqlite3 -html -header foods.db \"select * from dzh where
> qph15>10;\" >>mm.html");
> system("echo ^
> I get a foreign Key mismatch error. No matter what value I supply for
> FKeyColumn, even NULL, I get the same error.
Did you create unique index on t1 (RefColumn) ? IIRC, SQLite always
fails foreign key check if there's no index on a referenced column.
Pavel
On Sun, Apr 1, 2012 at 8:22 PM,
when I run this following code , the html file encoding changed to GB2312,not
utf-8, I don't know why?
system("echo ^ >mm.html");
system("sqlite3 -html -header foods.db \"select * from dzh where qph15>10;\"
>>mm.html");
system("echo ^ >>mm.html");
I'm running into an issue with foreign keys where no matter what value I
supply for a child key, I get a foreign key mismatch error. Here are my
test tables.
CREATE TABLE "t1" ("RefColumn" TEXT ,"Data" TEXT )
CREATE TABLE "t2" ("FKeyColumn" TEXT REFERENCES "t1"("RefColumn"),"Data"
TEXT )
On 1 Apr 2012, at 6:59am, John McMahon wrote:
> Thanks Igor (and Simon)
>
> That is pretty much the path I was thinking of taking (or possibly externally
> as I import the data), was just wondering if I had missed something in the
> date functions.
You're welcome.
On 01/04/2012 12:34 PM, Igor Tandetnik wrote:
John wrote:
Can the date time functions in SQLite correctly interpret a date string
like '20120331'?
No. Recognized formats are documented here:
http://sqlite.org/lang_datefunc.html
Is there a format or modifier
Igor Tandetnik wrote:
> Baruch Burstein wrote:
>> Does sqlite not support table aliases in update statements?
>
> Indeed it does not.
>
>> Is there a way
>> to work around this to get the affect of
>>
>> update table1 t1
>>set col1 = col1 * 2
>>where col1 <=
Here is a quick example that copies a small database from memory to disk:
using System.Data.SQLite;
namespace BackupAPI
{
class Program
{
public static void BackupAndGetData()
{
using (SQLiteConnection source = new SQLiteConnection(
"Data Source=:memory:"))
Bernd wrote:
>
> Could you be so kind and post a small example of how to use the Backup
> API from CSharp? I'm very interested in using it but have no clue how to
> convert the C-example on https://www.sqlite.org/backup.html to working
> CSharp code.
>
Here is a quick example that copies a
Am 31.03.2012 20:45, schrieb Joe Mistachkin:
System.Data.SQLite version 1.0.80.0 (with SQLite 3.7.11) is now available on
the System.Data.SQLite website:
http://system.data.sqlite.org/
Further information about this release can be seen at
I've been playing around with a geo-location database. I have a camera
mounted on our travel van. Periodically, it takes pictures of where we
are. I've written (OK, mostly re-written) various code I've found to
tag the pics with location, lat/lon, date, time, direction, speed, and
outside
On 1 Apr 2012, at 2:24pm, Igor Tandetnik wrote:
> Simon Slavin wrote:
>> On 1 Apr 2012, at 2:09pm, Baruch Burstein wrote:
>>
>>> update table1 t1
>>> set col1 = col1 * 2
>>> where col1 <= (select avg(col1)
>>>
On Apr 1, 2012, at 3:21 PM, Simon Slavin wrote:
> Can this be done with a JOIN instead of a sub-SELECT ?
Not in SQLite, as the join clause is not supported in an update statement.
For such functionality, look at MySQL or Postgress which do support variation
of such syntax.
Something like
Simon Slavin wrote:
> On 1 Apr 2012, at 2:09pm, Baruch Burstein wrote:
>
>> Does sqlite not support table aliases in update statements? Is there a way
>> to work around this to get the affect of
>>
>> update table1 t1
>>
>>set col1 = col1 * 2
>>
On 1 Apr 2012, at 2:09pm, Baruch Burstein wrote:
> Does sqlite not support table aliases in update statements? Is there a way
> to work around this to get the affect of
>
> update table1 t1
>
>set col1 = col1 * 2
>
>where col1 <= (select avg(col1)
>
>
Baruch Burstein wrote:
> Does sqlite not support table aliases in update statements?
Indeed it does not.
> Is there a way
> to work around this to get the affect of
>
> update table1 t1
>set col1 = col1 * 2
>where col1 <= (select avg(col1)
>
On Apr 1, 2012, at 3:09 PM, Baruch Burstein wrote:
> Does sqlite not support table aliases in update statements?
Nope, no aliasing in the update itself.
> Is there a way
> to work around this to get the affect of
>
> update table1 t1
>
>set col1 = col1 * 2
>
>where col1 <= (select
Does sqlite not support table aliases in update statements? Is there a way
to work around this to get the affect of
update table1 t1
set col1 = col1 * 2
where col1 <= (select avg(col1)
from table1
where col2=t1.col2);
--
Programming today is
Alessio Forconi wrote:
> I tried this way but it does not work
>
> UPDATE September Notes Recipes = Replace (Notes, | |, 'Location:')
UPDATE MyTable set Notes = 'Location: ' || replace(Notes, 'Location: ', '');
--
Igor Tandetnik
I tried this way but it does not work
UPDATE September Notes Recipes = Replace (Notes, | |, 'Location:')
where is the mistake?
> is there a way to update a field in this way?
>
> Fieldtoupdate:
> 1) Location: Rome. Location: New York.
> 2) Location: Florence. Location: Tuscany. Place: Arezzo
21 matches
Mail list logo