Re: [sqlite] Using IGNORE for complete record match

2016-10-21 Thread Rick Kohrs
an existing record compared to that of a >> proposed new record. That help? >> >>> On 10/21/2016 4:49 PM, Simon Slavin wrote: >>>> On 21 Oct 2016, at 10:46pm, Rick Kohrs <rick.ko...@ssec.wisc.edu> wrote: >>>> >>>> I want to make sure that I do

Re: [sqlite] Using IGNORE for complete record match

2016-10-21 Thread Rick Kohrs
All fields would match in an existing record compared to that of a proposed new record. That help? On 10/21/2016 4:49 PM, Simon Slavin wrote: On 21 Oct 2016, at 10:46pm, Rick Kohrs <rick.ko...@ssec.wisc.edu> wrote: I want to make sure that I do not insert a new record if ALL of the var

[sqlite] Using IGNORE for complete record match

2016-10-21 Thread Rick Kohrs
I want to make sure that I do not insert a new record if ALL of the variables match. I can potentially have 3 systems writing to the same database and I don't want duplicate records sqlCommand = """ CREATE TABLE himawari_db ( dateTime TEXT,

Re: [sqlite] Troubles matching variable as type TIMESTAMP

2016-10-21 Thread Rick Kohrs
thanks On 10/21/2016 3:04 PM, Keith Medcalf wrote: SQLite does not have a type of "TIMESTAMP". Only TEXT, INTEGER, REAL, and BLOB. They type of the data in the field depends on what you are storing in it. What are you storing in it (you cannot store Python objects, such as a datetime

[sqlite] Troubles matching variable as type TIMESTAMP

2016-10-21 Thread Rick Kohrs
Using Python 3.19. I am reading in a lines from an ever growing log file. Values from each line of the log file are parsed and placed into a database. Each record has a variable of type TIMESTAMP. Multiple records have the same the same value for time stamp. After a line is processed, I need

[sqlite] How to perform regex on string

2015-07-15 Thread Rick
string and return the result as a new string. Probably something like (logics wise) SELECT replace('#]*+>#i', '', string_to_modify) as result Sorry if this sounds like a stupid questions... but totally new to sqlite and its possibilities. Rick

Re: [sqlite] Client/Server Best Practices

2015-01-09 Thread Rick Kelly
with the backup api active and without and see what the session log records. Rick Kelly -- View this message in context: http://sqlite.1065341.n5.nabble.com/Client-Server-Best-Practices-tp79728p79920.html Sent from the SQLite mailing list archive at Nabble.com

Re: [sqlite] Client/Server Best Practices

2014-12-25 Thread Rick Kelly
Clients know nothing about the database, they just submit a request and get results. The server is the only process accessing and using SQLite. Rick Kelly -- View this message in context: http://sqlite.1065341.n5.nabble.com/Client-Server-Best-Practices-tp79728p79731.html Sent from the SQLite

[sqlite] Client/Server Best Practices

2014-12-25 Thread Rick Kelly
stability? I haven't yet tried to serialize update requests so that only one at a time is active. Rick Kelly -- View this message in context: http://sqlite.1065341.n5.nabble.com/Client-Server-Best-Practices-tp79728.html Sent from the SQLite mailing list archive at Nabble.com

Re: [sqlite] Help speed up query

2013-04-15 Thread Rick Troupin
Do you have appropriate indexes on the tables. See: http://stackoverflow.com/questions/1676448/using-sqlite-how-do-i-index-colum ns-in-a-create-table-statement -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of

[sqlite] Run sqlite from a batch file

2013-03-01 Thread Rick Guizawa
ally, would fill the textBox2.Text with the query results. However, I need to be able to execute a batch file from my C# code to run a series of sqlite3 commands to yield query results in .csv file. So, if someone from this forum could help me, I would really appreciate it. Thank you in advance.

[sqlite] unique combination of concatenated column query

2013-01-27 Thread Rick Guizawa
Hi, All. Could you, please, help me with sql query ? For example, if I have a table1 like the following (fields/values separated by commas): component, "bin", "prd" 2.1, "1", "217" 6.5, "4", "217" 7.1 ,"3", "217" 7.6 ,"5", "217" 7.7,"5", "217" 1.3

[sqlite] Re; Subrank query

2012-10-28 Thread Rick Guizawa
Dear Friends, please help with sqlite query, i have a table like: score| rank | game 98| 1 |1615 98| 1 |1615 92| 2 |1615 87| 3 |1615 87| 3 |1615 87| 3 |1615 112 | 1 |1616 94| 2 |1616 94| 2

Re: [sqlite] 1: near ")": syntax error

2012-08-08 Thread Rick Maddy
Get rid of the comma at the end of the 'timestamp' line. Rick On Aug 8, 2012, at 10:03 PM, Brandon Pimenta wrote: > I just found a bug in SQLite. It says "1: near ")": syntax error". Here's > my SQL query: > > CREATE TABLE online_status ( > use

Re: [sqlite] how to write this sql command?

2012-07-22 Thread Rick Maddy
INSERT INTO myTable (Rd, en, ue) SELECT 'aa', 'bb', ue FROM othertable; Rick On Jul 22, 2012, at 7:41 PM, YAN HONG YE wrote: > INSERT INTO myTable (Rd, en, ue) VALUES ("aa","bb",select ue from othertable); ___ sqlite-users ma

Re: [sqlite] Getting occasional crashes with sqlite3_prepare_v2 and sqlite3_step in iOS app

2012-07-19 Thread Rick Maddy
check. Rick On Jul 19, 2012, at 12:19 PM, Pavel Ivanov wrote: > SQLite is written in such a way that no call to sqlite3_bind_* can > cause memory corruption per se. It can return error if you are trying > to bind wrong parameter and your app can corrupt memory if along wi

Re: [sqlite] Getting occasional crashes with sqlite3_prepare_v2 and sqlite3_step in iOS app

2012-07-19 Thread Rick Maddy
with those calls. None of the crashes are reproducible at all. I have personally never seen one of the crashes. I get one or two reports a week from my user base. This is what makes this such a pain. As we all know, it's very hard to diagnose a problem we can't replicate. Rick On Jul 19, 2012, at 12

Re: [sqlite] Getting occasional crashes with sqlite3_prepare_v2 and sqlite3_step in iOS app

2012-07-19 Thread Rick Maddy
What about checking all the sqlite3_bind_* methods? Is it possible any of those could cause the problems I'm seeing? Rick On Jul 19, 2012, at 11:42 AM, Simon Slavin wrote: > > On 19 Jul 2012, at 6:03pm, Rick Maddy <rma...@gmail.com> wrote: > >> Thanks. Time to add

Re: [sqlite] Getting occasional crashes with sqlite3_prepare_v2 and sqlite3_step in iOS app

2012-07-19 Thread Rick Maddy
not all, and none of the 'prepare' statements. Thanks, Rick On Jul 19, 2012, at 11:42 AM, Simon Slavin wrote: > > On 19 Jul 2012, at 6:03pm, Rick Maddy <rma...@gmail.com> wrote: > >> Thanks. Time to add checks to nearly 400 prepare and step statements. > > Sorry

Re: [sqlite] EXT :Re: Getting occasional crashes with sqlite3_prepare_v2 and sqlite3_step in iOS app

2012-07-19 Thread Rick Maddy
But that would flag valid state changes just as much as it would flag corrupted memory. Rick On Jul 19, 2012, at 11:15 AM, Black, Michael (IS) wrote: > It could easiliy be expanded to look at the whole structure... > > > > Or just do an XOR checksum on the bytes in

Re: [sqlite] Getting occasional crashes with sqlite3_prepare_v2 and sqlite3_step in iOS app

2012-07-19 Thread Rick Maddy
Thanks but doesn't that code check to see if the database pointer has changed and not whether the memory it references has been corrupted? I guess that's a start though. Rick On Jul 19, 2012, at 11:02 AM, Black, Michael (IS) wrote: > Buffer overflow issues can cause problems at seemin

Re: [sqlite] Getting occasional crashes with sqlite3_prepare_v2 and sqlite3_step in iOS app

2012-07-19 Thread Rick Maddy
Thanks. Time to add checks to nearly 400 prepare and step statements. Rick ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Getting occasional crashes with sqlite3_prepare_v2 and sqlite3_step in iOS app

2012-07-19 Thread Rick Maddy
ng to help if the prepare statement crashes before returning? Thanks, Rick On Jul 19, 2012, at 10:32 AM, Simon Slavin wrote: > > On 19 Jul 2012, at 5:09pm, Rick Maddy <rma...@gmail.com> wrote: > >> Exception Type: SIGSEGV >> Exception Codes: SEGV_ACCERR at 0x1a >

[sqlite] Getting occasional crashes with sqlite3_prepare_v2 and sqlite3_step in iOS app

2012-07-19 Thread Rick Maddy
0x34cef6c9 sqlite3_step + 2105 === Thanks for any insights into these issues. Rick ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Quoting "id" versus 'id' in query

2012-06-12 Thread rick
On 11/06/2012 21:48, Larry Brasfield wrote: > On June 11, rick wrote: >> Something I noticed today: >> >> sqlite> select * FROM words WHERE word = "id"; >> >> >> sqlite> select * FROM words WHERE word = 'id'; >> 13556|id >> >

[sqlite] Quoting "id" versus 'id' in query

2012-06-11 Thread rick
r (column name). I think this is quite nasty behaviour. Hope it prevents someone making the same mistake! rick ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] User Defined Function using P/Invoke SQLite wrappers

2012-05-01 Thread Rick Guizawa
function in c# - sqlite application. I have collected basic ( probably incomplete) P/Invoke SQLite wrapper functions but I don't know how to include the user defined function in the wrapper. Thank you very much for any help you could give me. Cheers, Rick

[sqlite] Table inserts take a long time to complete.

2012-04-10 Thread Rick Guizawa
Hi All, I would very much appreciate if someone could help me speed up my database table insertion process as what I have in the followings took a long time to complete even when using sqlite3 shell command. Thank you in advance for your help. Cheers, Rick CREATE TABLE [BuyPattern] ( [ID

[sqlite] sqlite3.dll wrapper to import .csv file

2012-02-28 Thread Rick Guizawa
Hi All, I am using sqlite3.dll in my c# winform app, I was wondering if anyone knows how to import .csv file into sqlite db table using c# sqlite3.dll wrapper function. Thank's for any help I get. Cheers, Rick ___ sqlite-users mailing list sqlite-users

[sqlite] Can we access table column using field and index instead of name?

2012-02-23 Thread Rick Guizawa
Hi, would it be possible to reference a column in a table using other than its name? For example, if I have : create table X ( a TEXT NOT NULL); would it be possible to access x.a with something similar as x.field[0]? Thank's. ___ sqlite-users mailing

Re: [sqlite] SQLite Random Sampling

2012-02-17 Thread Rick Guizawa
t to reach samplesize } } } If I were to do it this way, it would take me about 30 hours to collect 17000 samples. I believe if I could do it faster using SQLite random number generator and query instead of C#. Hence, I'd really apprecia

[sqlite] SQLite Random number generator

2012-02-10 Thread Rick Guizawa
Hi All, how do you generate a random number between two numbers in your query using the random() function? Thank's. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Table insert takes very long time, please help..

2011-12-30 Thread Rick Guizawa
edit: I need to mention that BEGIN and COMMIT were already included in my insert. On Fri, Dec 30, 2011 at 10:53 PM, Rick Guizawa <guizaw...@gmail.com> wrote: > Hi all, I have the following tables: > > CREATE TABLE [a] ( > [ItemType] VARCHAR(10)  NOT NULL, > [Item]

[sqlite] Table insert takes very long time, please help..

2011-12-30 Thread Rick Guizawa
Hi all, I have the following tables: CREATE TABLE [a] ( [ItemType] VARCHAR(10) NOT NULL, [Item] VARCHAR(60) NOT NULL, [LastDate] DATE NOT NULL, [NextDate] DATE NOT NULL, [Probability] FLOAT NOT NULL, [Frequency] INTEGER NOT NULL, [TotalFrequency] INTEGER NOT NULL ) CREATE TABLE [b] ( [ID]

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-12-09 Thread Rick Regan
On Tue, Nov 30, 2010 at 12:29 AM, Shane Harrelson wrote: > > I've written two articles about this topic that summarize the problem and how it may be fixed: - http://www.exploringbinary.com/fifteen-digits-dont-round-trip-through-sqlite-reals/ This covers the original

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-30 Thread Rick Regan
On Tue, Nov 30, 2010 at 12:29 AM, Shane Harrelson wrote: > It turns out the same problem exists on Linux (I used sqlite3-3.7.3.bin); for example: sqlite> create table t1(d float); sqlite> insert into t1 values(9.87e+31); sqlite> select * from t1; 9.870001e+31 So it

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Rick Regan
On Mon, Nov 29, 2010 at 3:04 PM, Rick Regan <exploringbin...@gmail.com>wrote: > So the question remains -- why does the Windows build get it wrong? > I think I figured it out. It is due to the use of extended precision. In sqlite3.c, if you change "#define LONGDOUBLE

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Rick Regan
On Sun, Nov 28, 2010 at 8:55 AM, Black, Michael (IS) wrote: > > I find it interesting though that the math is different between the two > compilers...I wonder which is actually "correct" ?? > > > I ran a GMP version of the section of code we've highlighted, converting

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Rick Regan
On Mon, Nov 29, 2010 at 10:08 AM, Doug Currie wrote: > > The Grisu2 strings do "round trip" correctly, which I think is where this > thread started. > > Grisu addresses the "floating-point to decimal to floating-point" round-trip. The bug I found (it will become a bug

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Rick Regan
On Sun, Nov 28, 2010 at 8:09 PM, Doug Currie wrote: > The paper compares the performance of sprintf from glibc 2.11 and Grisu. I > don't know if glibc sprintf is based on Gay's code; at one point I thought > it was, but I cannot find an authoritative reference. > > In any

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-28 Thread Rick Regan
On Sun, Nov 28, 2010 at 5:52 PM, Doug Currie wrote: > > There is a new publication on this subject that may be of interest to those > looking at providing solutions: > > http://portal.acm.org/citation.cfm?id=1806623 > > It (Grisu2) works without bignums if you are willing

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-28 Thread Rick Regan
On Sun, Nov 28, 2010 at 4:01 PM, Doug Currie <doug.cur...@gmail.com> wrote: > On Nov 28, 2010, at 11:18 AM, Rick Regan wrote: > > > Michael, > > Thanks for the very thorough analysis. > > This is a difficult problem; fortunately it was solved 20 years ago... > &g

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-28 Thread Rick Regan
BTW, I get the CORRECT result when running the precompiled command line on Linux: SQLite version 3.7.3 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> create table t1(d float); sqlite> insert into t1 values(8.948471e15); sqlite> select * from t1; 8.948471e+15

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-28 Thread Rick Regan
Michael, Thanks for the very thorough analysis. Yes, sorry, I forgot to state I was running on Windows. The results I got came from running the command window (the precompiled Windows binary sqlite-3_7_3.zip). I also got the same results from compiling the amalgamation

[sqlite] Some floats of 15 digits or less do not round-trip

2010-11-27 Thread Rick Regan
onversion was not. (This is different than the issue of bug http://www.sqlite.org/src/tktview?name=1248e6cda8 .) Rick Regan -- Check out my blog: http://www.exploringbinary.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

Re: [sqlite] synchronous issue

2010-08-09 Thread Lei, Rick (GE EntSol, SensInsp)
spend more time to study the database design to enhance the performance. Thanks! BR Rick -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Monday, August 09, 2010 3:07 PM To: General Discussion of SQLite

[sqlite] synchronous issue

2010-08-09 Thread Lei, Rick (GE EntSol, SensInsp)
data which are not written to the disk? And how can I force sqlite to write these data on disk? Thanks! BR Rick ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] DB files are different between PC sideandinstrumentside.

2010-05-11 Thread Lei, Rick (GE EntSol, SensInsp)
OK, got it. Thanks! BR Rick -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Wednesday, May 12, 2010 10:01 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] DB files are different between

Re: [sqlite] DB files are different between PC side andinstrumentside.

2010-05-11 Thread Lei, Rick (GE EntSol, SensInsp)
Hi, Pavel, Thanks for your comments. Another question is if Sqlite uses at least 1 page for each table and index, does it means if the contents in a table doesn't fill 1 page, Sqlite will not request a new page when operating this table. Is it right? BR Rick -Original Message- From

Re: [sqlite] Insert large data question ??

2010-05-11 Thread Lei, Rick (GE EntSol, SensInsp)
Try to use transaction syntax. Rick -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of �L�~ Sent: Tuesday, May 11, 2010 1:48 PM To: sqlite-users@sqlite.org Subject: [sqlite] Insert large data question ?? Dear I have about 9

Re: [sqlite] DB files are different between PC side and instrumentside.

2010-05-11 Thread Lei, Rick (GE EntSol, SensInsp)
. Of course the space is not a problem now. Because we can easily find a 8G or 16G SDHC card. However I think we still need to take care of it. Maybe I need to return a smaller number when querying the sector size. BR Rick -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite

[sqlite] DB files are different between PC side and instrument side.

2010-05-11 Thread Lei, Rick (GE EntSol, SensInsp)
is full filled with 0 in the file. And I can't find these parts in the files generated on PC side. I don't know why the files are different between PC side and instrument side. I think they should be same. Is there any advice? Thanks! Rick ___ sqlite-users

Re: [sqlite] Reverse Referencing Rows

2009-11-11 Thread Rick Ratchford
to FEB 05, you'd be going from one year into the next. The data must be in sets from NOV 05 to FEB 05, not the other way around, if that is what the user selects. Hope this makes it clearer. Cheers! Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sql

Re: [sqlite] Reverse Referencing Rows

2009-11-11 Thread Rick Ratchford
& _ lngEndMth - lngStartMth & ") * 100 + (" & lngEndDay - lngStartDay & ") + 1300) % 1300 " & _ "ORDER BY Date, Year, ((Month - " & lngStartMth & ")*100 + (Day - " & lngStartDay & ") + 1300) % 1300"

Re: [sqlite] Reverse Referencing Rows

2009-11-11 Thread Rick Ratchford
Only business days are in the data sets. No weekends or Holidays. So I was happy with the other sets because they ARE full sets. A full set is ALL THE BUSINESS DAYS from the Start to End Date. Cheers! Rick #>-Original Message- #>From: sqlite-users-boun...@sqli

Re: [sqlite] Reverse Referencing Rows

2009-11-11 Thread Rick Ratchford
DATE that is greater than the last ROW. #> #>So, just say that in ORDER BY. Is that what I did when I added "Date" to my ORDER BY? I'm assuming it is. But correct me if not. #> #>> Is it possible to have the SQL statement above do this as well? #> #>Yes. But then, lies the mystery. :

Re: [sqlite] Reverse Referencing Rows

2009-11-10 Thread Rick Ratchford
StartMth & ") * 100 + (" & lngEndDay - lngStartDay & ") + 1300) % 1300 " & _ "ORDER BY Date, Year, ((Month - " & lngStartMth & ")*100 + (Day - " & lngStartDay & ") + 1300) % 1300" Cheers! Rick #>

[sqlite] Reverse Referencing Rows

2009-11-10 Thread Rick Ratchford
possible to have the SQL statement above do this as well? I know I can loop through this recordset, transferring each record to an array that has a date greater than the last record (row) date value. It's an extra step and easy to program. I'm just curious if it was possib

Re: [sqlite] Get Max Samples

2009-11-10 Thread Rick Ratchford
quot;] GROUP BY Year in the statement. This seems to do the trick. Thanks ya'll. :-) Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik #>Sent: Tuesday, November 10, 2009 2:33 PM #>To: sqlit

[sqlite] Get Max Samples

2009-11-10 Thread Rick Ratchford
records (say there are 23 SampleNumber = 17 in the table, more than any other), you wanted to return the value 23? If I use max(SampleNum), that will return only the highest value in the column rather than what I want, right? Is group_concat used here? Thank you. Rick

Re: [sqlite] Tackling the Date Scan SQL

2009-10-14 Thread Rick Ratchford
. Thanks for the suggestion. :) Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- #>boun...@sqlite.org] On Behalf Of Pavel Ivanov #>Sent: Wednesday, October 14, 2009 7:45 PM #>To: General Discussion of SQLite Database #>Subject: Re:

[sqlite] Tackling the Date Scan SQL

2009-10-14 Thread Rick Ratchford
9 03 31 1989 04 01 ...starting the next 10/01 to 04/01 extraction... 1989 10 01 1989 10 02 ... ... ...and so forth. Problem is that by adding the 'Year' to ORDER BY, while it does in fact give me the above format, it also includes info

Re: [sqlite] Need Help SQL

2009-10-13 Thread Rick Ratchford
Thanks! Cheers! #>-Original Message- #>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- #>boun...@sqlite.org] On Behalf Of sub sk79 #>Sent: Monday, October 12, 2009 9:35 PM #>To: General Discussion of SQLite Database #>Subject: Re: [sqlite] Need Help SQL #> #>Hi!, #> #>Here

Re: [sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
What I'm missing is a stiff drink. Ouy! I really bumbled this easy task. My one allowance this month, eh? Cheers! Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- #>boun...@sqlite.org] On Behalf Of Jean-Christophe Deschamps #>

Re: [sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
the fractional part of the answer as the remainder. For example: 7 mod 3 = 1 In my mental relapse, I did 7/3 = 2.. So . was my remainder. See how stressed out I am. LOL!!! Sorry about my incorrect reply. Cheers! Rick #>-Original Message- #>From: sqlite-user

Re: [sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
#>Hi Rick, #> #> #>You seem to be misinterpreting the semantics of the % (modulo) operator. #> #> X % Y returns the (integral) remainder of the Euclidean division of #>X by Y (both integers). #> #>Now things should be clearer. #> Hi. I didn't misinterpret th

[sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
ike this, it would be appreciated if you could walk me through the LOGIC as to your conclusion. What was the thinking process behind this? Thank you. :) Rick ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mail

Re: [sqlite] Need Help SQL

2009-10-12 Thread Rick Ratchford
0) % 1300 <= -4 * 100 + 0 ORDER BY ((Month - 8)*100 + (Day - 1) + 1300) % 1300 #>In the the right-hand side of <= operator, you only apply "mod 1300" to #>((lngEndDay - lngStartDay) + 1300) part but not to #>(lngEndMth - lngStartMth)*100 part

Re: [sqlite] Need Help SQL

2009-10-12 Thread Rick Ratchford
#>Doesn't your VB SQLite binding support parameterized statements? If so, #>I'd suggest you dump it and find a better one. #> #>Igor Tandetnik I'm not up on the terminology. I'm using Olaf Schmidt's VB SQLite binder. He'd probably be better to answer this question than

Re: [sqlite] Need Help SQL

2009-10-11 Thread Rick Ratchford
mber. #> #>Igor Tandetnik That slight complication is still there though. It works when the start < end, but it fails the other way around. Pretty clever with the numbering system though. And thanks for suggestion. :-) Rick ___ sqlite-u

Re: [sqlite] Need Help SQL

2009-10-11 Thread Rick Ratchford
Igor, Okay, I give. What do the 100 and 1300 values signify? I am completely baffled at how you arrived at these values and what they do. Thanks. Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- #>boun...@sqlite.org] On Behalf Of Igor

Re: [sqlite] Need Help SQL

2009-10-09 Thread Rick Ratchford
Thank you Igor. I will. :-) Cheers! Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- #>boun...@sqlite.org] On Behalf Of Igor Tandetnik #>Sent: Friday, October 09, 2009 6:46 PM #>To: sqlite-users@sqlite.org #>Subject: Re: [sql

[sqlite] Need Help SQL

2009-10-09 Thread Rick Ratchford
d 4/16 of each year of data I have in the table, no Month number could be greater than/equal to 10 and also less than/equal to 4. I'm still pretty green on working out these SQL statements. I'm hoping some suggestions will help. Thanks. Rick ___ sqlite

Re: [sqlite] Date Cutoff Statement

2009-08-03 Thread Rick Ratchford
#>Rick Ratchford wrote: #>> #>Try #>> #> #>> #>date(max(Date), 'weekday 5') #>> #>> It's likely I'm not using it correctly, because it returns #>nothing. :( #> #>I mean, replace "Date" in your statement with this expression. As i

Re: [sqlite] Date Cutoff Statement

2009-08-03 Thread Rick Ratchford
gt; #>date(max(Date), (5 - count(*)) || ' days') #> #>but that won't work right if you are missing, say, Tuesday data. #> #>Igor Tandetnik And that wouldn't work for me since there are days prior to Friday that may not have data due to Holidays. It's starting to look like I'm going to have to loop through my recordset after it has been created, check each date, and if not a Friday, change it there. Thanks! Rick ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Date Cutoff Statement

2009-08-03 Thread Rick Ratchford
I'm a real greenie on this, so you might say I'm baffled. :-b Thanks. Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik #>Sent: Monday, August 03, 2009 9:01 PM #>To: sqlite-users@sqlite

Re: [sqlite] Date Cutoff Statement

2009-08-03 Thread Rick Ratchford
osed a whole new one!). Seems my GROUPED data has a slight flaw. While most of the rows contain a FRIDAY date, there are some that have THURSDAYS date because no data was available for that particular Friday. This is a problem, since I must have nothing but FRIDAY dates for each row no matter if the

[sqlite] Date Cutoff Statement

2009-08-03 Thread Rick Ratchford
rior to GROUP BY... (and yes, assume Date and dStopDate are same format), my last record returned is actually 07/27/2009 (the day before my dStopDate) rather than my 'weekly' record of 07/24/2009. I can't put my finger on my error. Anyone have a suggestion? T

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
Olaf tells me that it's stored as Text-String. Either as '-mm-dd' or '-mm-dd hh:mm:ss', depending on how I decide to store my VB type dates. Anyway, the original problem was solved. I simply neglected to address the need for 'quotes' around my date variable. Thanks Rich. :-) Rick

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
It was set as String actually. I've since changed it to ShortDate today. I believe this is a WRAPPER thing though. I'm programming in VB6 and using Olaf's VB wrapper. :) Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@s

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
And that, my friend, was the missing link! Thank you! Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of David Bicking #>Sent: Monday, August 03, 2009 1:57 PM #>To: General Discussion of SQLite Dat

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
Okay, I think I understand what you are saying. The native Date in a table without any additional expressions is '-mm-dd 00:00:00'. Those "00:00:00" must be my problem. Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
previous post, I have sDateTemp formatted in the same format as that which is in the table. That's why I'm puzzled. Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik #>Sent: Monday

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
That was a quick response! The Date is being stored as -mm-dd. Note the "Format$(Date, '-mm-dd') as Date" that assures this. And I have it in this format for sDateTemp so that they would compare the same. But it does not work. So what am I doing wrong? Tha

[sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
ot;-mm-dd" in sDateTemp before using it in this SQL statement. But that didn't seem to solve the problem. I'm still getting a single blank record. How do you properly do a Date comparison in SELECT so that the only rows returned are those that do not exceed the date found in my sDateTem

Re: [sqlite] Little Help on SQL

2009-07-26 Thread Rick Ratchford
number from this 10 year sample. So what I was looking to do (and have successfully done so) is to get a count of each DOY (day of year) in the sampling. This allows for calculations that need to know how many actual particular DOY there is rather than how many years there is. :-) Rick

Re: [sqlite] Little Help on SQL

2009-07-26 Thread Rick Ratchford
Seems my answer was a simple one after all. I only needed to be aware of GROUP BY. Found it though. GROUP BY DayNum. Works. :-) Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Rick Ratchford #>

[sqlite] Little Help on SQL

2009-07-26 Thread Rick Ratchford
. Rather, if any particular day falls on a weekend, it won't be in the dataset, so you may have: DayNum(1) 5 total DayNum(2) 4 total DayNum(3) 4 total DayNum(4) 3 total etc. How do I word my statement so that it gives me a count of each DayNum, which is from 1 to 366? Thanks. Rick

Re: [sqlite] The SQL Guide to SQLite

2009-07-19 Thread Rick Ratchford
hooked! Anyway, when I've gathered enough info from the book I'll share my thoughts on it. It will be from the perspective of a person new to SQLite and SQL. Regards to all! Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@s

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
. Best regards, Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Neville Franks #>Sent: Saturday, July 18, 2009 9:11 PM #>To: sqlite-users@sqlite.org #>Subject: Re: [sqlite] The SQL Guide t

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
inal Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Rich Shepard #>Sent: Saturday, July 18, 2009 8:00 PM #>To: General Discussion of SQLite Database #>Subject: Re: [sqlite] The SQL Guide to SQLite #> #>On Sat, 18 Jul 2009, R

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
r information during production. I think some kind of convention explanation would have been appropriate at the beginning of this book like most programming books provide rather than assuming everyone is familiar with conventions used in "academic papers". Thanks. :-) Rick #>-Ori

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
Yes. You are correct. That is what they are. Thanks for pointing this out. It probably should have been made clear at the beginning of the book since this is not common in the majority of books I own purchased here in the US. Thanks again. Rick #>-Original Message- #>From:

[sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
Greetings! I just received my copy of the new book "The SQL Guide to SQLite" by Rick F. van der Lans. There are many references within the book that are contained in square brackets and some sort of keyword or code. Example: "...written about SQLite; see for example [NEWM

Re: [sqlite] Is it Possible in SQL...

2009-07-10 Thread Rick Ratchford
ldName-String-Resolving into the Rs.Fieldlist #>on each iteration (just posted that for more clarity). Great. I'm glad that it is faster as well. I just find it easier to reference recordset 'cells' using x/y coordinates rather than moving that cursor around. Thanks Olaf. Rick _

Re: [sqlite] Is it Possible in SQL...

2009-07-10 Thread Rick Ratchford
f my application requiring virtually no interaction that it is acceptable for some of the internal procedures? What are "scaling issues"? Thanks. :-) Rick ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Is it Possible in SQL...

2009-07-10 Thread Rick Ratchford
#>"Rick Ratchford" <r...@amazingaccuracy.com> schrieb im #>Newsbeitrag news:c9ce387e92004e7b9c16ddaa2bd36...@dolphin... #> #>> So modifying TmpTable, which will still be needed for other #>> procedures, is not preferred. It would be great if a #>records

Re: [sqlite] Is it Possible in SQL...

2009-07-10 Thread Rick Ratchford
Thanks Simon. I didn't take any offense or anything, and I REALLY DO appreciate your comments and opinions. My long reply was only to share how SQLite and the VB wrapper has been making my life much easier on many tasks I used to do solely with loops and arrays. All the best. Rick

Re: [sqlite] Is it Possible in SQL...

2009-07-10 Thread Rick Ratchford
.tax #> then "Down" #> else null #> end #> from MarketTable b #> where b.rowid=MarketTable.rowid-1) from MarketTable #> #>If you need to include other columns, you can list them at #>the top level select. #> #>Wes #> Ah, I get it. Nice. Thank you!

Re: [sqlite] Is it Possible in SQL...

2009-07-10 Thread Rick Ratchford
#>On 10 Jul 2009, at 9:31pm, Rick Ratchford wrote: #> #>> After examining the above, it appears that what this does is modify #>> the table itself. So I suppose then that it is not possible #>to create #>> a recordset instead that meets what I'm trying to do. If #&

  1   2   >