Re: [sqlite] WHERE CLAUSE in UNICODE

2009-11-29 Thread Igor Tandetnik
Irshad Alam wrote: > I want to use WHERE Clause for unicode search in database. Let me clear more > about my requirement. Suppose I've a database whose table name is employee > having name, age and salary as three columns. > > Now I want to make query on employee table which gives the result

Re: [sqlite] sqlite3 is blocked by transaction when wanting to close the sqlite3 *

2009-11-29 Thread liubin liu
Thank you! I'm sorry for not showing clearly the environment is embedded linux on arm board. Because there are several process who use the database. I have another question:Could I close the database of other process in main process? Nick Shaw-3 wrote: > > By "other process" do you mean a

Re: [sqlite] Moving Average?

2009-11-29 Thread npearson99
Thanks everyone. I was able to calculate a moving average via one of the examples someone put down without all oracle specific statements. I have another question, but I'm going to use a new thread to ask it :). Good to know about the weighted moving average. -- View this message in context:

Re: [sqlite] Moving Average?

2009-11-29 Thread Rod Dav4is
A very simple and useful Weighted Moving Average can be had without keeping a number of samples on hand. WMA = (WMA + NewSample) / 2 I.e. the new WMA is the average of the current WMA and the value of the new sample. This weights successive samples by decreasing powers of 2: Current

Re: [sqlite] Detecting and creating corrupt files

2009-11-29 Thread Ben
> On Sun, 29 Nov 2009 10:31:29 +, Ben > wrote: > >> Hi all, >> >> I write an SQLite browser for macs, and someone recently brought to >> my >> attention that it doesn't handle corrupt database files very well. >> I've read the pages on pragmas for integrity

Re: [sqlite] It's done, except for this nit:

2009-11-29 Thread Rich Shepard
On Sun, 29 Nov 2009, Ted Rolle, Jr. wrote: > I need for computed total price to display with leading and trailing > zeros. > E.g. > 1 -> 1.00 > 2.5 -> 2.50 > .9 -> 0.90 Ted, It is most common to handle display issues in the UI component. _Most_ applications have three components: a database

Re: [sqlite] WHERE CLAUSE in UNICODE

2009-11-29 Thread Jean-Christophe Deschamps
>Now I want to make query on employee table which gives the result having >names start between 'D' and 'M', so probable I'll do something " SELECT * >FROM employee WHERE name BETWEEN 'd%' AND 'n%' ". But this is very >specific >if I know the characters. I want to avoid using the character and

[sqlite] It's done, except for this nit:

2009-11-29 Thread Ted Rolle, Jr.
I need for computed total price to display with leading and trailing zeros. E.g. 1 -> 1.00 2.5 -> 2.50 .9 -> 0.90 The extended price is computed with this statement: round(purchase.qty*inventory.price/100.0,2) Ted

[sqlite] WHERE CLAUSE in UNICODE

2009-11-29 Thread Irshad Alam
I want to use WHERE Clause for unicode search in database. Let me clear more about my requirement. Suppose I've a database whose table name is employee having name, age and salary as three columns. Now I want to make query on employee table which gives the result having names start between 'D'

Re: [sqlite] Moving Average?

2009-11-29 Thread Igor Tandetnik
npearson99 wrote: > I'm just trying to get some of the analytic functions to work, but I keep > getting a syntax error. I got this from a sql wiki page, so I hope > something like this will work. > > select sum(salary) over > (partition by months order by minutes rows between unbounded preceding

Re: [sqlite] Detecting and creating corrupt files

2009-11-29 Thread Kees Nuyt
On Sun, 29 Nov 2009 10:31:29 +, Ben wrote: >Hi all, > >I write an SQLite browser for macs, and someone recently brought to my >attention that it doesn't handle corrupt database files very well. >I've read the pages on pragmas for integrity checking and how

[sqlite] Detecting and creating corrupt files

2009-11-29 Thread Ben
Hi all, I write an SQLite browser for macs, and someone recently brought to my attention that it doesn't handle corrupt database files very well. I've read the pages on pragmas for integrity checking and how locking problems can cause corruption, but am looking for something a bit

Re: [sqlite] Moving Average?

2009-11-29 Thread Simon Slavin
On 29 Nov 2009, at 5:08am, npearson99 wrote: > select sum(salary) over > (partition by months order by minutes rows between unbounded preceding and > current row) > from tblSalaryData > > I get an error by partition. I know this doesn't give me the moving > average, I'm just trying to get the