Re: [sqlite] How to make this calculation in VIEW

2010-11-19 Thread Jeff Archer
Thank you, Simon and Owen. I have tried and both solutions work equally well.  I have actually used C code to make the calculation as I pull out the data. But to help further my understanding of SQL/SQLite, can anyone comment on potential performance differences of the 2 SQL solutions. CREATE

Re: [sqlite] How to make this calculation in VIEW

2010-11-18 Thread O'Neill, Owen
Hi Jeff, I haven't actually tried it, but just by inspection I would guess that a view can't refer to another column within itself, so there are 2 options. Create a second view on top of the first view. (I've not tested this - note how the view name is aliased to just 'Patterns' because I'm

Re: [sqlite] How to make this calculation in VIEW

2010-11-18 Thread Simon Davies
On 17 November 2010 22:13, Jeff Archer wrote: > First let me say thank you to all for the very good support that receive here. > > I have the these tables and view > . . . > > I would like to add these calculated columns to my view but not sure how to > make >

[sqlite] How to make this calculation in VIEW

2010-11-18 Thread Jeff Archer
First let me say thank you to all for the very good support that receive here. I have the these tables and view // Patterns table CREATE TABLE IF NOT EXISTS [Patterns] ( PatternID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, Name  VARCHAR NOT NULL UNIQUE, Description   VARCHAR NOT