Re: [sqlite] SQL newbie, how to implement a delete correctly.

2014-12-30 Thread Jonathan Leslie
ot;;\"}"delete from "parent01" where --- 1417556005;delete from "child01" where --- 1417626376;delete from "child01" where --- 1417626391;delete from "child01" where --- 1417703626;delete from "child01" where --- 1417703753;delete from

Re: [sqlite] SQL newbie, how to implement a delete correctly.

2014-12-30 Thread Jonathan Leslie
7626391delete from "child01" where VALUES(1417703626delete from "child01" where VALUES(1417703753delete from "child01" where VALUES(1419259626 From: Jonathan Leslie To: Jonathan Leslie ; General Discussion of SQLite Database ; General Discussion of SQLite Data

Re: [sqlite] SQL newbie, how to implement a delete correctly.

2014-12-30 Thread Jonathan Leslie
d01" VALUES(1417703753,'second record, same as first ok so I change the description a bit.','anotherfilename.txt',1417556005,1417561613,1417556069,1417626207,'myfile.txt');INSERT INTO "child01" VALUES(1419259626,'second record, same as first duplcated

Re: [sqlite] SQL newbie, how to implement a delete correctly.

2014-12-30 Thread Jonathan Leslie
y|31|CREATE TABLE sim_attenuation_summary (table|st_launch_params|st_launch_params|32|CREATE TABLE st_launch_params (table|st_scenario|st_scenario|33|CREATE TABLE st_scenario (table|threat_cfg|threat_cfg|36|CREATE TABLE threat_cfg (table|cm_cfg|cm_cfg|38|CREATE TABLE cm_cfg ( From: J Decker T

Re: [sqlite] SQL newbie, how to implement a delete correctly.

2014-12-30 Thread Jonathan Leslie
PRAGMA foreign_key_list(table-name) I don't know the table-name, how do I get a list of table names in the database? From: Simon Slavin To: Jonathan Leslie ; General Discussion of SQLite Database Sent: Tuesday, December 30, 2014 11:14 AM Subject: Re: [sqlite] SQL newbie, h

Re: [sqlite] SQL newbie, how to implement a delete correctly.

2014-12-30 Thread Jonathan Leslie
id == 123: child01 table:child01.scene_gen_cfg_id== 222child01.scene_gen_cfg_id== 432... child02 table:child02.xxx_id = 2432... etc.    the idea is without knowing all the names of all the tables, find all references to parent01.p01_id (where value is xxx)  From: Hick Gunter To: '

[sqlite] SQL newbie, how to implement a delete correctly.

2014-12-30 Thread Jonathan Leslie
I have a database schema with several tables, and it uses foreign key relationships.   I'm trying to figure out a good implementation for deleting a record.  As we know simply removing a record that is used as a foreign key in another table have serious implications.  The first thing I'd like is

Re: [sqlite] trying to store a file as a blob. caught on syntax...

2014-12-03 Thread Jonathan Leslie
E\Scenario Management\ahk_sceptre>i3.png C:\jon\svn\SCEPTRE\trunk\SCEPTRE\Scenario Management\ahk_sceptre> - Original Message - > From: Keith Medcalf > To: Jonathan Leslie ; General Discussion of SQLite > Database > Cc: > Sent: Wednesday, December 3, 2014 8:27 PM &

Re: [sqlite] trying to store a file as a blob. caught on syntax...

2014-12-03 Thread Jonathan Leslie
sqlite> .version SQLite 3.8.5 2014-06-04 14:06:34 b1ed4f2a34ba66c29b130f8d13e9092758019212 sqlite> - Original Message - > From: Jonathan Leslie > To: General Discussion of SQLite Database > Cc: > Sent: Wednesday, December 3, 2014 8:36 PM > Subject: Re: [sqli

Re: [sqlite] trying to store a file as a blob. caught on syntax...

2014-12-03 Thread Jonathan Leslie
ere name='image2.png'; Error: no such function: writefile sqlite> - Original Message - > From: Keith Medcalf > To: Jonathan Leslie ; General Discussion of SQLite > Database > Cc: > Sent: Wednesday, December 3, 2014 8:27 PM > Subject: Re: [sqlite] try

Re: [sqlite] trying to store a file as a blob. caught on syntax...

2014-12-03 Thread Jonathan Leslie
> > From: Clemens Ladisch >To: sqlite-users@sqlite.org >Sent: Wednesday, December 3, 2014 1:00 PM >Subject: Re: [sqlite] trying to store a file as a blob. caught on syntax... > > >Jonathan Leslie wrote: >> I'm at a cmd.exe p

[sqlite] trying to store a file as a blob. caught on syntax...

2014-12-03 Thread Jonathan Leslie
I'm on a window 7 x64 machine, at a cmd.exe prompt.   This is what I tried:  C:\jone>sqlite3 test2.db3SQLite version 3.8.5 2014-06-04 14:06:34Enter ".help" for usage hints.sqlite> CREATE TABLE Files (name TEXT PRIMARY KEY,contents BLOB);sqlite> INSERT INTO Files (name,contents) VALUES ('tsql.lis

Re: [sqlite] Importing a cvs file

2014-07-19 Thread Jonathan Leslie
>On Fri, 18 Jul 2014 07:53:57 -0700 >Jonathan Leslie wrote: > >> What I do is I never use a CSV file as a "Comma separated Values" >> file but rather as a "Character separated Values"  file, but rather >> use a Character, º (0186), a legal character but not o

Re: [sqlite] Importing a cvs file

2014-07-18 Thread Jonathan Leslie
I tested excel 2010 on a windows 7 machine 64 bit.   I entered the data, and did a "save as" choosing the type .csv MS-DOS version. All worked out with proper quotes for data fields, and quotes in the data field delimited.  On Friday, July 18, 2014 9:11 PM, Keith Medcalf wrote: > > >>Mostly

Re: [sqlite] Importing a cvs file

2014-07-18 Thread Jonathan Leslie
e: > > > >On 2014/07/18 21:32, Jonathan Leslie wrote: >> Ryan, >> >> You are quite right, it is not a perfect solution.  Thank you for your >> detailed explanation your's is a much more complete >> solution.  I never knew about the  quotes syntax

Re: [sqlite] Importing a cvs file

2014-07-18 Thread Jonathan Leslie
ot;this is a comment field lets quote ""something"" and see what happens. "ºnumber 4ºlast field 6ºfield 1ºfield 2ºthis is a comment fieldºnumber 4ºlast field On Friday, July 18, 2014 11:49 AM, RSmith wrote: > > > >On 2014/07/18 16:53, Jonathan Leslie wrote: &g

Re: [sqlite] Importing a cvs file

2014-07-18 Thread Jonathan Leslie
I have a similar situation about to happen.  I also have the issue where one of the data fields is a text section that the user fills in and of course, he is free to put commas in this field.   I believe that this will result in higgly-piggly (that's a technical term) when I do the import.   Wha

Re: [sqlite] trying to get things to work from the command line on windows 7 x64

2014-07-13 Thread Jonathan Leslie
Jan,  Yes, thank you I see.  the download of the x64 mingw is failing behind my proxy here.  the installer wants to phone home for some repository tool.  is there anyway around that?           OR can I use the 32-bit sqlite?    On Thursday, July 10, 2014 7:47 PM, Jonathan Leslie

Re: [sqlite] trying to get things to work from the command line on windows 7 x64

2014-07-13 Thread Jonathan Leslie
: > > >2014-07-10 22:17 GMT+02:00 Jonathan Leslie : > >> question 1) what am I doing wrong? > >Your compiler is 32-bit MinGW, but you unpacked the >64-bit dll in your current directory. > >Regards, >      Jan Nijtmans >___

Re: [sqlite] trying to get things to work from the command line on windows 7 x64

2014-07-11 Thread Jonathan Leslie
int callback(void *NotUsed, int argc, char **argv, char **azColName){     int i;     for(i=0; i wrote: > > >Jan, thank you for your great advise.   - Jon > > > > > >On Friday, July 11, 2014 8:50 AM, Jan Nijtmans wrote: > > >> >> >>2014-07-

Re: [sqlite] trying to get things to work from the command line on windows 7 x64

2014-07-11 Thread Jonathan Leslie
Jan, thank you for your great advise.   - Jon On Friday, July 11, 2014 8:50 AM, Jan Nijtmans wrote: > > >2014-07-11 13:45 GMT+02:00 Jonathan Leslie : >> Jan, >> >> Yes, thank you I see.  the download of the x64 mingw is failing behind my >> proxy here.  the

Re: [sqlite] trying to get things to work from the command line on windows 7 x64

2014-07-11 Thread Jonathan Leslie
Jan,  Yes, thank you I see.  the download of the x64 mingw is failing behind my proxy here.  the installer wants to phone home for some repository tool.  is there anyway around that?           OR can I use the 32-bit sqlite?    On Thursday, July 10, 2014 7:53 PM, Jonathan Leslie

Re: [sqlite] trying to get things to work from the command line on windows 7 x64

2014-07-10 Thread Jonathan Leslie
tes >               4 Dir(s)  27,661,144,064 bytes free On Thursday, July 10, 2014 4:38 PM, Igor Tandetnik wrote: > > >On 7/10/2014 4:17 PM, Jonathan Leslie wrote: > >> Now, when I run a.exe, it crashes with an "application was unable to start >> correctly

Re: [sqlite] trying to get things to work from the command line on windows 7 x64

2014-07-10 Thread Jonathan Leslie
Update:  ok this is working in cygwin, so maybe my GCC compiler on the windows side cmd.exe side is all higgly piggly? on windows cmd.exe whereis gcc shows gcc is at: \mingw\bin\gcc.exe whereis isn't in my current cygwin install.  On Thursday, July 10, 2014 4:17 PM, Jonathan Leslie

[sqlite] trying to get things to work from the command line on windows 7 x64

2014-07-10 Thread Jonathan Leslie
Hey folks, I'm fresh off the boat with sqlite, but I'm an old-timer C programmer on Unix.  I have to work on a window's 7 x64 for this project, and I also for the first time have to use SQL and I want to use SQL using C, gcc, and SQLITE.   So I went to the website and downloaded:  Directory of