RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread RB Smissaert
nal Message- > From: RB Smissaert [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 03, 2006 8:56 AM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Dealing with dates in the format mmdd > > > I am familiar with Excel and I have tried that but it doesn't work. > I

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread RB Smissaert
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. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 03 December 2006 17:22 To: sqlite-users@sqlite.org Subje

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread RB Smissaert
present date and time not only according to any time zone but to comply with more than just the Gregorian calendar - with Middle Eastern and Oriental ones should the need arise. RB Smissaert wrote: > Trouble is I need to import dates from Interbase that have the integer > format

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread RB Smissaert
than just the Gregorian calendar - with Middle Eastern and Oriental ones should the need arise. RB Smissaert wrote: > Trouble is I need to import dates from Interbase that have the integer > format mmdd. How would I convert that (at import) to the SQLite date > format? I do the import v

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread RB Smissaert
ars and incorporates the time, storing all of it in a 64 bit floating point format. You should be able to translate the date into a yymmdd format of some description from Interbase and use that to insert into Sqlite. The ISO 8601 date and time format is a widely used standard. RB Smissaert wrote: >>Wh

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread RB Smissaert
-users@sqlite.org Subject: Re: [sqlite] Dealing with dates in the format mmdd Why not use Interbase to transform the date into a character string, like an ISI8601 date or yymmdd, dd-mm- etc and then use the Sqlite date function to insert it into Sqlite? RB Smissaert wrote: >>It

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread RB Smissaert
ot;CAST((E.ADDED_DATE - CAST(E.ADDED_DATE / 1 AS INT) * 1) / 100 AS INT) || '/' || " & "CAST(E.ADDED_DATE / 1 AS INT) AS VARCHAR(10)) But I haven't got it working yet. RBS -----Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 03 December 2006 21:

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread RB Smissaert
- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 03 December 2006 23:30 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Dealing with dates in the format mmdd I know nothing of Interbase, but cannot imagine that it does not have a set of date manipulation functions. RB Smissaert wrote

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread RB Smissaert
. The second is to transform your dates into the Sqlite date format. It depends upon your application and reuse of legacy code. RB Smissaert wrote: > Don't know that much about it myself, but there are no functions for this > that I know of. There are third party UDF's though and that is pr

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-04 Thread RB Smissaert
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

RE: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-04 Thread RB Smissaert
cember 2006 21:23 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Dealing with dates in the format mmdd 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 d

[sqlite] Deleting rows with duplicate in one field

2006-12-04 Thread RB Smissaert
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

RE: [sqlite] Re: Deleting rows with duplicate in one field

2006-12-04 Thread RB Smissaert
? RBS -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: 04 December 2006 23:42 To: SQLite Subject: [sqlite] Re: Deleting rows with duplicate in one field RB Smissaert <[EMAIL PROTECTED]> wrote: > Trying to delete rows in a SQLite table where > One pa

[sqlite] Interbase to SQLite

2006-12-06 Thread RB Smissaert
I think I might have asked this before, but I still haven't figured it out. What would be the fastest way to move data from Interbase to SQLite? I will have to do this in VB/VBA, unless I could use a dll written in for example C or C++. Currently I get the data with the Intersolve ODBC driver,

RE: [sqlite] Interbase to SQLite

2006-12-06 Thread RB Smissaert
Thanks for the tip. It sounds promising and I will try that out. RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 06 December 2006 23:16 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Interbase to SQLite RB Smissaert wrote: > I think I might have as

RE: [sqlite] Interbase to SQLite

2006-12-06 Thread RB Smissaert
Thanks, I had found it. RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 06 December 2006 23:43 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Interbase to SQLite RB Smissaert wrote: > Thanks for the tip. It sounds promising and I will try that

RE: [sqlite] Interbase to SQLite

2006-12-06 Thread RB Smissaert
] Interbase to SQLite RB Smissaert wrote: > I think I might have asked this before, but I still haven't figured it out. > What would be the fastest way to move data from Interbase to SQLite? > I will have to do this in VB/VBA, unless I could use a dll written in for > example C or C++. >

RE: [sqlite] Interbase to SQLite

2006-12-07 Thread RB Smissaert
te] Interbase to SQLite > > > Hi Dennis, > > I have installed the whole lot and it went very smoothly. > Now though I am not sure what the next step is. Were you saying there > was a driver to connect to both Interbase and SQLite like an > ODBC driver? > Or did you have somethi

RE: [sqlite] Interbase to SQLite

2006-12-07 Thread RB Smissaert
ite like an > ODBC driver? > Or did you have something else in mind? > > RBS > > > RB Smissaert wrote: > >> Unfortunately it looks it needs installing the .NET > framework and J#. > >> I will keep it in mind, but for now that has put me off this route. >

RE: [sqlite] Interbase to SQLite

2006-12-07 Thread RB Smissaert
. Enjoy your new found programming language. - Original Message - From: "RB Smissaert" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Thursday, December 07, 2006 5:11 PM Subject: RE: [sqlite] Interbase to SQLite > OK, I think I get it now. > There

RE: [sqlite] Interbase to SQLite

2006-12-07 Thread RB Smissaert
and a more powerful way than VB/VBA. Enjoy your new found programming language. - Original Message - From: "RB Smissaert" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Thursday, December 07, 2006 5:11 PM Subject: RE: [sqlite] Interbase to SQLite >

RE: [sqlite] Searching for data

2006-12-07 Thread RB Smissaert
How about simply: WHERE cola LIKE '%hello%juan%casa%' OR colb LIKE '%hello%juan%casa%' Etc. RBS -Original Message- From: jose isaias cabrera [mailto:[EMAIL PROTECTED] Sent: 07 December 2006 22:55 To: sqlite-users@sqlite.org Subject: [sqlite] Searching for data Greetings. I have a

[sqlite] Operation is not allowed when the object is closed

2006-12-09 Thread RB Smissaert
Keep getting this error when trying to create a table in SQLite. There is a valid connection object and it is open and I have no idea what is causing this: Operation is not allowed when the object is closed. Error number: 3704 Thanks for any advice RBS

RE: [sqlite] Operation is not allowed when the object is closed

2006-12-09 Thread RB Smissaert
@sqlite.org Subject: Re: [sqlite] Operation is not allowed when the object is closed "RB Smissaert" <[EMAIL PROTECTED]> wrote: > Keep getting this error when trying to create a table in SQLite. There is a > valid connection object and it is open and I have n

RE: [sqlite] Operation is not allowed when the object is closed

2006-12-09 Thread RB Smissaert
ke Founder Point Of Light Software http://www.polsoftware.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, December 09, 2006 5:36 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Operation is not allowed when the object is closed "RB Smi

RE: [sqlite] Operation is not allowed when the object is closed

2006-12-09 Thread RB Smissaert
This is the full Sub that sets the connection, except for leaving out a msgbox text: Sub SetSQLiteConnection(Optional bNoRecords As Boolean, _ Optional strDBFile As String, _ Optional lPageSize As Long = -1) Dim strDBPath As String If

RE: [sqlite] Operation is not allowed when the object is closed

2006-12-09 Thread RB Smissaert
I don't really need the loop and I could just do: If SQLiteConn.State <> slStateOpen Then SQLiteConn.Open End If Will try that in a bit. Still, the connection gets closed and opened all the time with the same routine and no problem at all, except for in that shown

[sqlite] Check for empty table

2006-12-13 Thread RB Smissaert
Trying to find the fastest way to determine if a table has no rows. I think this will do: SELECT (SELECT ROWID FROM table limit 1) IS NOT NULL; If a table has rows then the result should be 1. But I am not sure if a table always has the hidden field ROWID. RBS

RE: [sqlite] Check for empty table

2006-12-13 Thread RB Smissaert
Nothing wrong, but is it the fastest? RBS -Original Message- From: Scott Hess [mailto:[EMAIL PROTECTED] Sent: 13 December 2006 17:25 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Check for empty table On 12/13/06, RB Smissaert <[EMAIL PROTECTED]> wrote: > Trying to find th

[sqlite] Transpose table

2006-12-13 Thread RB Smissaert
I am moving my code away from VBA and transferring it to SQL. There is one particular routine where I haven't found a good replacement for and that is to transpose a table from a vertical layout to a horizontal one, like this example: ID Value - 1 A 1 B 1 A 3

RE: [sqlite] Transpose table

2006-12-13 Thread RB Smissaert
you better. -- Darren Duncan At 12:08 AM + 12/14/06, RB Smissaert wrote: >I am moving my code away from VBA and transferring it to SQL. >There is one particular routine where I haven't found a good replacement for >and that is to transpose a table from a vertical layout to a horiz

RE: [sqlite] Calculate years and months difference with Julian Date?

2006-12-17 Thread RB Smissaert
, sqlite3_value **argv){ DateTime x; if (isDate(argc, argv, ) == 0){ computeYMD(); sqlite3_result_int(context, x.M); } /*if*/ }/*monthFunc*/ /*!!!End TSI addition.*/ RB Smissaert wrote: > Is it possible with Julian dates in 2 fields to calculate the months and/or >

RE: [sqlite] Calculate years and months difference with Julian Date?

2006-12-17 Thread RB Smissaert
] Calculate years and months difference with Julian Date? I answered your question. It is possible and showed you how to do it. The rest is up to you. RB Smissaert wrote: > I am not into C and I want to stay clear from compiling SQLite. > Or do I misunderstand this? > > RBS >

RE: [sqlite] Calculate years and months difference with Julian Date?

2006-12-17 Thread RB Smissaert
] Calculate years and months difference with Julian Date? On 12/18/06, RB Smissaert <[EMAIL PROTECTED]> wrote: > Yes, and it is nice to know that this is an option. > I am using a VB wrapper though and not using the SQLite dll. > Will figure something out. > > RBS In VB.net I once sol

RE: [sqlite] Calculate years and months difference with Julian Date?

2006-12-17 Thread RB Smissaert
ecember 2006 01:52 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Calculate years and months difference with Julian Date? "RB Smissaert" <[EMAIL PROTECTED]> wrote: > Is it possible with Julian dates in 2 fields to calculate the months and/or > years difference betwee

[sqlite] calculate age

2006-12-22 Thread RB Smissaert
Is there a way to calculate the age given the 2 dates in the standard format -mm-dd? I could do julianday('now') - julianday(dateofbirth) and divide by 365, but that won't be accurate enough. It would be easy to calculate the age in the application and update the database, but I prefer to do

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
nal Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 22 December 2006 17:03 To: sqlite-users@sqlite.org Subject: [sqlite] calculate age Is there a way to calculate the age given the 2 dates in the standard format -mm-dd? I could do julianday('now') - julianday(dateofbirth) and div

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
Re: [sqlite] calculate age RB Smissaert wrote: > Is there a way to calculate the age given the 2 dates in the standard format > -mm-dd? I could do julianday('now') - julianday(dateofbirth) and divide > by 365, but that won't be accurate enough. > It would be easy to ca

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
ent: 22 December 2006 18:12 To: sqlite-users@sqlite.org Subject: Re: [sqlite] calculate age RB Smissaert wrote: > Is there a way to calculate the age given the 2 dates in the standard format > -mm-dd? I could do julianday('now') - julianday(dateofbirth) and divide > by 365, but that won't

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
Yes, thanks that works. Will do a bit of testing to see which one is the fastest. RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 22 December 2006 19:05 To: sqlite-users@sqlite.org Subject: Re: [sqlite] calculate age RB Smissaert wrote: > Tha

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
Re: [sqlite] calculate age RB Smissaert wrote: > I think I got it now: > > select > (date('now') - '2002-12-22') - > ((julianday('now', '-' || > (date('now') - '2002-12-22') || > 'year') < > julianday('2002-12-22'))) > > seems to

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
: [sqlite] calculate age "RB Smissaert" <[EMAIL PROTECTED]> wrote: > Is there a way to calculate the age given the 2 dates in the standard format > -mm-dd? I could do julianday('now') - julianday(dateofbirth) and divide > by 365, but that won't be accurate e

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
Can confirm now that mine didn't work and yours does. Nice work! RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 22 December 2006 19:17 To: sqlite-users@sqlite.org Subject: Re: [sqlite] calculate age RB Smissaert wrote: > I think I got it now: > &g

[sqlite] VB wrappers

2006-12-23 Thread RB Smissaert
Found this site: http://www.tannertech.net/sqlite3vb/index.htm#make_dll_vb_compat which looks like a nice tutorial about making a VB compatible wrapper. Had a go with the ready made dll and it all looks to be working nicely and Perhaps slightly faster than the commercial wrapper from

RE: [sqlite] VB wrappers

2006-12-23 Thread RB Smissaert
that could speed up inserts? RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 23 December 2006 20:05 To: sqlite-users@sqlite.org Subject: [sqlite] VB wrappers Found this site: http://www.tannertech.net/sqlite3vb/index.htm#make_dll_vb_compat which looks like a nice

RE: [sqlite] VB wrappers

2006-12-23 Thread RB Smissaert
> PRAGMA cache_size > PRAGMA default_cache_size Thanks, will experiment with those. My bytes per row are small, but the number of rows to insert can be large, up to a few million, although typically up to a few 100.000. RBS -Original Message- From: Kees Nuyt [mailto:[EMAIL PROTECTED]

RE: [sqlite] date - SQL extraction from day, month and year

2006-12-26 Thread RB Smissaert
I think if your dates are in the ISO8601 format, that is -mm-dd then this will do it: SELECT strftime('%Y', '2006-12-26') More fully explainede here: http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions RBS -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

RE: [sqlite] Using sqlite.exe

2006-12-30 Thread RB Smissaert
I think if your database was made with SQLite 2 then you can't open it with SQLite 3. In that case you will need SQLite 2, which I think is still available. RBS -Original Message- From: Michael Hooker [mailto:[EMAIL PROTECTED] Sent: 30 December 2006 11:18 To: sqlite-users@sqlite.org

[sqlite] Analyze before or after setting indices?

2006-12-30 Thread RB Smissaert
Doing some performance tweaking and wondering if there are any logical reasons why it would be better to analyze a table before or after setting the indices. I could figure it out by timing, but maybe somebody could tell me already why one is better than the other. RBS

RE: [sqlite] Using sqlite.exe

2006-12-30 Thread RB Smissaert
with SQLite3. That's why I asked specifically about SQLite3 databases! Michael Hooker -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 30 December 2006 12:22 To: sqlite-users@sqlite.org; [EMAIL PROTECTED] Subject: RE: [sqlite] Using sqlite.exe I think if your

RE: [sqlite] Analyze before or after setting indices?

2006-12-30 Thread RB Smissaert
Thanks; I obviously missed something very essential there. RBS -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 30 December 2006 14:56 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Analyze before or after setting indices? "RB Smissaert" <[EM

RE: [sqlite] What's the collective term for table, view, trigger etc?

2007-01-06 Thread RB Smissaert
> Is there a standard (or even non-standard) term that refers to the > tables, triggers, views, indexes (any others?) in a database? I have seen the term relations being used for this. RBS -Original Message- From: Joe Wilson [mailto:[EMAIL PROTECTED] Sent: 06 January 2007 15:06 To:

RE: [sqlite] Re[2]: Table Schema; 2. Using this list

2007-01-20 Thread RB Smissaert
I need table info all the time and I used to parse the table sqlite_master, but as you say that is a bit of a hassle and I have now switched to using pragma table_info('" & strTable & "') This is a VB function, but you will get the idea: Function GetSQLiteTableInfo(strDB As String, _

RE: [sqlite] Re: Table Schema

2007-01-20 Thread RB Smissaert
As said you can run pragma table_info(table) in C as a query against the database table and it will give you all the info you need without any awkward parsing. RBS -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 January 2007 20:05 To: RB Smissaert Subject

[sqlite] UPDATE with join on ROWID

2007-01-21 Thread RB Smissaert
Need to do an UPDATE on one table, based on values in another table where this other table is joined to the first table on rowid of table 1 = column value of table 2, so: UPDATE table1 SET col2 = (SELECT t2.col2 FROM table2 t2 WHERE ROWID = t2.col1)

[sqlite] Re: UPDATE with join on ROWID

2007-01-21 Thread RB Smissaert
Forget about this one, I can of course just to do: UPDATE table1 SET col2 = (SELECT t2.col2 FROM table2 t2 WHERE table1.ROWID = t2.col1) Must have been looking too much at complex things, so overlooking the simple ones. RBS

[sqlite] SQLite3VB.dll

2007-01-24 Thread RB Smissaert
Having a look at the VB wrapper dll SQLite3VB.dll from Todd Tanner at: http://www.tannertech.net/sqlite3vb/index.htm All working very nicely and also nice to have the option (as explained in the tutorial) to compile the SQLite source yourself. So, thanks Todd for making that available. I have

RE: [sqlite] SQLite3VB.dll

2007-01-24 Thread RB Smissaert
Thanks, that makes it clear. > SQLite implements the command "DELETE FROM table" without a WHERE clause > by dropping and recreating the table. Interesting, didn't know that. Maybe I should re-create when the majority or a lot of rows are deleted. RBS -Original Message- From: Trey

[sqlite] pragma table_info not working on empty table

2007-01-24 Thread RB Smissaert
It just looks that this pragma won't give me the fields and data types if the table has no rows yet, but was just created. Is this indeed so and if so is there a way round it? I am trying to avoid parsing sqlite_master as I used to do that and using this pragma is a much cleaner way to do this.

RE: [sqlite] pragma table_info not working on empty table

2007-01-24 Thread RB Smissaert
-- From: "RB Smissaert" <[EMAIL PROTECTED]> > It just looks that this pragma won't give me the fields and data types if > the table has no rows yet, but was just created. Is this indeed so and if so > is there a way round it? > I am trying to avoid parsing s

RE: [sqlite] SQLite3VB.dll

2007-01-24 Thread RB Smissaert
bTab & arr(r, c) End If End If Next Next MsgBox strResult, , strDB End Sub Sub ShowDBCollection() Dim i As Long Dim strResult As String If collSQLiteDB Is Nothing Then Exit Sub End If If collSQLiteDB.Count = 0 Then Exit Sub

[sqlite] return table data without fields

2007-01-27 Thread RB Smissaert
Using the VB wrapper dll from Todd Tanner: http://www.tannertech.net/sqlite3vb/index.htm and it has this function to return table rows: Private Declare Function sqlite_get_table _ Lib "SQLite3VB.dll" _ (ByVal DB_Handle As Long, _

RE: [sqlite] return table data without fields

2007-01-27 Thread RB Smissaert
will be sent to VB6 will be of type Null and can be tested with the VB6 function IsNull(..) properly. Regards, Trey - Original Message - From: "RB Smissaert" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Saturday, January 27, 2007 7:01 AM Subject: [sqlite] return

RE: [sqlite] return table data without fields

2007-01-27 Thread RB Smissaert
, can't you just ignore the first row when referencing your data? It seems to me at that point you won't have any significant performance penalties. Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED

[sqlite] Limit statement size?

2007-01-28 Thread RB Smissaert
Is there any limit on the size of the SQL statements in SQLite? Didn't think this would come into play, but have now come across this query and wonder if this needs considering: UPDATE A3Test115_J SET ENTRY_ID_E2 = (SELECT ENTRY_ID FROM GROUP_2 T WHERE PATIENT_ID = T.PID), READ_CODE_E2 = (SELECT

RE: [sqlite] Limit statement size?

2007-01-28 Thread RB Smissaert
AIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 28 January 2007 18:20 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Limit statement size? "RB Smissaert" <[EMAIL PROTECTED]> wrote: > Is there any limit on the size of the SQL statements in SQLite? 32-bit integers are used to count th

RE: [sqlite] Limit statement size?

2007-01-28 Thread RB Smissaert
ransaction with multiple update statements be much more efficient and a much lighter load on resources on a step by step basis? I damn well know it would be much more pleasing to the eye! :-) Fred > -Original Message----- > From: RB Smissaert [mailto:[EMAIL PROTECTED] > Sent: Sunday, Januar

RE: [sqlite] Limit statement size?

2007-01-28 Thread RB Smissaert
: Re: [sqlite] Limit statement size? You have any way to normalize that original source table? It's full of extents, which is the first sign of badness in a table design and assured of complicating your life. Clay RB Smissaert wrote: > Yes, I agree it looks messy, but I used to do this in st

RE: [sqlite] Limit statement size?

2007-01-28 Thread RB Smissaert
just to perform a straight-forward UPDATE. > > Fred > > > -Original Message- > > From: RB Smissaert [mailto:[EMAIL PROTECTED] > > Sent: Sunday, January 28, 2007 12:07 PM > > To: sqlite-users@sqlite.org > > Subject: [sqlite] Limit statement size? >

RE: [sqlite] Limit statement size?

2007-01-28 Thread RB Smissaert
t1.PATIENT_ID = g2.PID and t1.PATIENT_ID = g3.PID and t1.PATIENT_ID = g4.PID and t1.PATIENT_ID = g5.PID ... and t1.PATIENT_ID = g15.PID --- RB Smissaert <[EMAIL PROTECTED]> wrote: > UPDATE A3Test115_J SET ENTRY_ID_E2 = (SELECT ENTRY_ID FROM GROUP_2 T WHERE > PATIEN

RE: [sqlite] Limit statement size?

2007-01-29 Thread RB Smissaert
D = g2.PID and t1.PATIENT_ID = g3.PID and t1.PATIENT_ID = g4.PID and t1.PATIENT_ID = g5.PID ... and t1.PATIENT_ID = g15.PID --- RB Smissaert <[EMAIL PROTECTED]> wrote: > Thanks, will have a look at that. > It definitely look

RE: [sqlite] Limit statement size?

2007-01-29 Thread RB Smissaert
Thanks, that is how I understood it to be. I must be overlooking something simple here. RBS -Original Message- From: Gerry Snyder [mailto:[EMAIL PROTECTED] Sent: 29 January 2007 23:52 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Limit statement size? RB Smissaert wrote: > Had a

RE: [sqlite] Limit statement size?

2007-01-30 Thread RB Smissaert
: [sqlite] Limit statement size? --- RB Smissaert <[EMAIL PROTECTED]> wrote: > Thanks, that is how I understood it to be. > I must be overlooking something simple here. Check your SELECT sub-statement within the REPLACE statement to see what rows it returns. .header on .mode tabs create

RE: [sqlite] Limit statement size?

2007-01-31 Thread RB Smissaert
ror like this in SQLite version 3.3.12: SQL error: X values for Y columns Assuming PATIENT_ID is the sole unique key for A3TestB67_J and your SQL column counts match, the REPLACE should work. --- RB Smissaert <[EMAIL PROTECTED]> wrote: > Have tried this, but it didn't alter the tab

RE: [sqlite] Limit statement size?

2007-01-31 Thread RB Smissaert
for the assistance. RBS -Original Message- From: Joe Wilson [mailto:[EMAIL PROTECTED] Sent: 31 January 2007 00:51 To: sqlite-users@sqlite.org Subject: RE: [sqlite] Limit statement size? --- RB Smissaert <[EMAIL PROTECTED]> wrote: > I can see now what the trouble is if I do t

RE: [sqlite] Limit statement size?

2007-01-31 Thread RB Smissaert
Actually make that about 5 to 6 times as fast. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 31 January 2007 17:39 To: sqlite-users@sqlite.org Subject: RE: [sqlite] Limit statement size? Can confirm now that the method with INSERT OR REPLACE is faster indeed

RE: [sqlite] Limit statement size?

2007-01-31 Thread RB Smissaert
I could do is see how many tables are to be added and pick the method accordingly. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 31 January 2007 17:54 To: sqlite-users@sqlite.org Subject: RE: [sqlite] Limit statement size? Actually make that about 5 to 6

RE: [sqlite] Limit statement size?

2007-01-31 Thread RB Smissaert
us a nicer looking SQL. I wonder what the reason was to limit the number of table joins to 32. RBS -Original Message- From: Joe Wilson [mailto:[EMAIL PROTECTED] Sent: 01 February 2007 00:42 To: sqlite-users@sqlite.org Subject: RE: [sqlite] Limit statement size? --- RB Smissaert <[EM

[sqlite] How do I know sqlite_get_table is finished

2007-02-01 Thread RB Smissaert
Using the VB wrapper dll SQLite3VB.dll from Todd Tanner's site: http://www.tannertech.net/sqlite3vb/index.htm In one particular procedure I had a serious problem when doing a call to sqlite_get_table, causing Excel to crash. It took me a long time to pinpoint the trouble as VBA debugging methods

RE: [sqlite] How do I know sqlite_get_table is finished

2007-02-01 Thread RB Smissaert
the function call correctly. -- Eric Pankoke Founder / Lead Developer Point Of Light Software http://www.polsoftware.com/ -- Original message -- From: "RB Smissaert" <[EMAIL PROTECTED]> > Using the VB wrapper dll SQLite3VB.dll from Todd Ta

RE: [sqlite] How do I know sqlite_get_table is finished

2007-02-01 Thread RB Smissaert
Good thought, but 1. I set the connection 2. get the array 3. dump it in the sheet 4. and then close the connection. The crash happens at number 2. I am sure I must be overlooking something simple here. The trouble is that this error is not consistent. RBS -Original Message- From: Guy

RE: [sqlite] How do I know sqlite_get_table is finished

2007-02-01 Thread RB Smissaert
h SQLite and I left that out. RBS -Original Message- From: Eric Pankoke [mailto:[EMAIL PROTECTED] Sent: 02 February 2007 02:04 To: sqlite-users@sqlite.org Subject: RE: [sqlite] How do I know sqlite_get_table is finished Is it possible for you to post the "offending&quo

RE: [sqlite] How do I know sqlite_get_table is finished

2007-02-02 Thread RB Smissaert
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

RE: [sqlite] How do I know sqlite_get_table is finished

2007-02-02 Thread RB Smissaert
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

[sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Still having a problem when selecting data from one particular table with the VB wrapper dll SQLite3VB.dll. It is only a small table and I just can't see why there would be a problem. Would anybody be willing to have a look at this table? The zipped database file is only 15 Kb. Thanks. RBS

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Wasn't sure if it was allowed to post attachments to this forum. I will see if I can reproduce this and send the zipped db to here. RBS -Original Message- From: Guy Hachlili [mailto:[EMAIL PROTECTED] Sent: 07 February 2007 15:40 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Still

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Ah, now after closing Excel and reopening it and doing the select again on that same table it now does crash Excel. This is the same table I sent in the zipped db. RBS -Original Message- From: Guy Hachlili [mailto:[EMAIL PROTECTED] Sent: 07 February 2007 15:40 To:

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Not sure now the zip file has come through to this forum. I can see it, but I also got a message that it wasn't allowed. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 07 February 2007 16:19 To: sqlite-users@sqlite.org Subject: RE: [sqlite] Still Excel crash

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Thanks for that. I am not familiar with compiling C code and haven't compiled SQLite yet. Could you send me your dll so I could try that? Database seems fine to me as well, but I definitely have trouble with only that particular table. RBS -Original Message- From: Guy Hachlili

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
can't handle this, making Excel crash. As SQLite can handle large blob data it must be very unlikely indeed that SQLite is to blame. Will see if there is anything known about this in VB/VBA. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 07 February 2007 16:16

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
When searching for this problem the first one I found was one from myself of a few years back: http://shorterlink.co.uk/6813 So, I think this is what the trouble is and nil to do with SQLite. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 07 February 2007 21

RE: [sqlite] x000 line queries - only for benchmarks?

2007-02-08 Thread RB Smissaert
Yes, VBA supports both, but as it is just for logging purposes my solution is fine, particularly as these long queries have repetitions of similar elements. Also the function sqlite_get_table will produce an array and the error happens directly when that function is called, so how is using a

RE: [sqlite] x000 line queries - only for benchmarks?

2007-02-08 Thread RB Smissaert
/ -- Original message -- From: "RB Smissaert" <[EMAIL PROTECTED]> > Yes, VBA supports both, but as it is just for logging purposes my solution > is fine, particularly as these long queries have repetitions of similar > elements. > > Also the function sqlite_

[sqlite] SELECT DISTINCT but ignore one column?

2007-02-15 Thread RB Smissaert
It sometimes would be very useful if you could do a SELECT DISTINCT, but ignoring the data in one (or maybe more) particular column. So for example col1 col2 col3 - ABC ADC Then doing SELECT DISTINCT (IGNORE col2) * from table would produce: ABC It

RE: [sqlite] SELECT DISTINCT but ignore one column?

2007-02-15 Thread RB Smissaert
aggregate function on the "ignored" column HTH, Sam --- We're Hiring! Seeking a passionate developer to join our team products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] -Original Message----

RE: [sqlite] SELECT DISTINCT but ignore one column?

2007-02-15 Thread RB Smissaert
suggestion. RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 15 February 2007 23:01 To: sqlite-users@sqlite.org Subject: Re: [sqlite] SELECT DISTINCT but ignore one column? RB Smissaert wrote: > It sometimes would be very useful if you could do a SELECT DISTI

RE: [sqlite] Update and insert questions

2007-02-16 Thread RB Smissaert
I did say I was nearly new to SQLite. RBS -Original Message- From: Jim Crafton [mailto:[EMAIL PROTECTED] Sent: 16 February 2007 16:28 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Update and insert questions On 2/16/07, RB Smissaert <[EMAIL PROTECTED]> wrote: > Nearly new

RE: [sqlite] retrieval speedup help requested

2007-02-17 Thread RB Smissaert
Try running: analyze city_loc after adding the index. RBS -Original Message- From: Tom Shaw [mailto:[EMAIL PROTECTED] Sent: 17 February 2007 22:16 To: sqlite-users@sqlite.org Subject: [sqlite] retrieval speedup help requested In sqlite 3 I have two tables. city_loc has 156865 entries

RE: [sqlite] retrieval speedup help requested

2007-02-17 Thread RB Smissaert
al Message----- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: Saturday, February 17, 2007 5:25 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] retrieval speedup help requested Try running: analyze city_loc after adding the index. RBS -Original Message- From: Tom Shaw [mai

[sqlite] Month string from yyyy-mm-dd

2007-02-18 Thread RB Smissaert
Is it possible with the date-time functions to get the month as a string, so January etc. from the date in the format -mm-dd? I can get the month as a number like this: select strftime('%m', '2007-02-17') and I could do a table update by joining to a month lookup table, but I wonder if there

<    1   2   3   >