sqlite3

Limit by running total in SQLite

Let's say I have a table like this (ordered by id): id amount --- --- 1 10 2 15 3 10 4 30 I want a query which will return rows such that the sum of amount is greater than a given number. So (in a non-existing syntax) SELECT id, amount LIMIT BY running_total(amount) 20 selects first 2 rows, ... LIMIT BY running_to...

Am I Correct: android supports 'all-table' SQLite queries but not queries against SQLite views?

This is a re-post of a problem reported by bafilius on July 16 22:10. I am posting my reply separately here for reasons of 'currency'. I can confirm a similar error: I have the same database running under MS SQL, MySQL, and SQLite3. [The application 'Web Bones' can be viewed at georgiansoftware.com user/password 'Guest'/'Guest2009'.] I ...

Running integration tests with Cucumber/capybara/celerity on a Jruby on Rails application using mysql

I've got an application I've been working on with ruby 1.9.1. I'd like to test the javascript in my UI and the default selenium driver for capybara doesn't support the events I need to test. So I'm going through the process of using rvm to switch the application on to jruby for testing, since apparently celertiy/culerity only work on j...

SQLite Optimization for Android application

We have about 7-8 tables in our Android application each having about 8 columns on an average. Both read and write operations are performed on the database and I am experimenting and trying to find ways to enhance the performance of the DataAccess layer. So, far I have tried the following: Use positional arguments in where clauses (R...

Creating primary key on two columns

I am using SQLite GUI Browser to work with the database. I can't find any button to make primary key on two or more columns. How to do this? ...

Ruby interface for sqlite3 fails , need help !!! :(

I was trying to install sqlite3 interface for ruby in my Ubuntu 10.10. But i got the following error any suggestions ? ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb extconf.rb:3:in `require': no such file to load -- mkmf (LoadError) from extconf.rb:3 ...

Open two tables from one SqlLite db in one iPhone Class?

hai guys, small clarification is this possible to open two tables from one sqlite db in one iphone class??? but i can't open it please give me the solution i'm a beginner here i tried coding - (void)viewDidLoad { [super viewDidLoad]; list = [[NSMutableArray alloc] init]; if ([material isEqualToString:@"Derlin"]) { ...

I was trying to install sqlite3 interface for ruby in my mac snow leopard 10.6.3. But i got the following error any suggestions ?

for this command i got this error "sudo gem install sqlite3-ruby" Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /Syste...

can't select the multiple table from sqlite database using iPhone?

Possible Duplicate: Open two tables from one SqlLite db in one iPhone Class? I'm using one database contain multiple table but i can't select the 2nd table from the database. i can select only one table from db. i'm using sqlite database in iPhone application This is my code - (void)viewDidLoad { [super viewDidLoad];...

Sqlite Opening Error : Unable to open database

Hi, In my app, I use a calendar control to store the information date-wise. Calendar Control's Link : http://blog.webscale.co.in/?p=244 Problem : For example, the current selected month is October 2010. Now if I switch back to April 2010 and try to comeback to Ocober 2010 & access data from calendar that I stored in the month of Oct...

How to make InMemory.db a Memory mapped file and use it as database in MFC

I have to use InMemory.db in my project but the performance is slow the InMemory.db size is 10 MB. Some queries which retrives more than 30000 records take a lot of time. Is their any way i can improve the performance. How to make InMemory.db a Memory mapped file and use it as database in MFC. An example will be very helpfull? ...

How can I write to a SQLite database file in a SourceForge project's web space?

I have a small Perl-based CGI application, which I am running in the project web space provided for a SourceForge project. This application stores data in a SQLite (v. 3) database file. When I run test scripts from a shell, I can read from and write to this SQLite file. However, when the CGI code is executed by Apache, it has read-o...

Display CoreData Records

Hi, I create an application using Coredata. I create a XML file and store all data into XML file. Then using coredata i store them into Database. Now i want to view the all records from core data. My application create a sqlite file. But if i use select command in sqlite, there is no records displayed. But It shows "no errors". If ther...

[newbie ] How to install ruby interface for sqlite3 in Mac snow leopard ?

I tried to install it as below but it throws error :- "sudo gem install sqlite3-ruby" Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files ...

Crash when use SQlite Persistence Object on iphone device

I use SQLite Persistence Object in my App. It's working well on simulator but when i deploy on the device. Sometime it's work, sometime not. My app often is crashed and i got:"Program received signal: “EXC_BAD_ACCESS”." on Debugger Console. In the Debugger i got: #0 0x3153311c in sqlite3_blob_write #1 0x31501b7c in sqlite3_os_end #2...

SQLite strings with NUL

Can strings in SQLite 3 include NUL characters? If the answer to 1 is "yes", how can they be written in SQL queries? SQLite doesn't seem to have chr or char functions. ...

Stupid sql error.

Hello. I have this sql statement: SELECT game.game_id FROM game, userGame WHERE userGame.user_id = 1 AND userGame.game_id != game.game_id; And I'm getting this: 1 1 2 2 3 3 4 4 4 5 5 5 I'm running the statement on a Sqlite3 database on Android 2.1. The tables are: USERGAME -------- userId gameId more_columns GAME ----- gameId m...

SQLite -- sum over small sections of column based on index in other column

I would like to sum over the product of two columns, but I would like to do it in small sections. That is, for every symbol for every date I would like to sum the product of oi and 'contract_settle`. Here's a snippet of my SQLite db: date symbol cont oi contract_settle 20030103 NVLS1C 100 NA 20030103 NVLS1C 03F 19 3...

How do you match multiple column in a table with SQLite FTS3?

Lets say I have a table with columns A , B , C , D and I want to do a match on column A and C I see that you can either match a single column or all column in sqlite ie - match column A select * from table where A match 'cat' - match all columns select * from table where table match 'cat' Is it possible to match only columns A and ...

Core Data or Sqlite in my Project?

I'm trying to develop one iPhone App like the Recipes example of Apple, but I have one question? I want to show data that I have stored in a database, but I don't want user to add data or edit this information. I only want to show the data in a table view like name, description, image, etc. What's the best option? Core Data (and how I ad...