Re: [sqlite] What am I doing wrong?

2014-08-09 Thread Luuk
On 8-8-2014 23:57, Errol Emden wrote: The SQL script you wrote actually provides the same information as mine - it lists all movies that Julie Andrews is in but it does NOT provide who is the leading actor in each movie, as all names selected is that of Julie Andrews. must have missed that ;-)

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Errol Emden
ns of your caliber who totally understands SQL and can provide efficient solutions to problems forum members, like myself, may have. Again, thanks and be well. > Subject: RE: [sqlite] What am I doing wrong? > Date: Fri, 8 Aug 2014 17:40:28 -0600 > From: kmedc...@dessus.com > To: eem...@ho

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Keith Medcalf
at a working "most direct" (or brute force) translation in order to remove obvious inefficiency and perhaps coax maximum performance from the solution. >-Original Message- >From: Errol Emden [mailto:eem...@hotmail.com] >Sent: Friday, 8 August, 2014 16:20 >

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Errol Emden
Keith...thanks vmuch for your insightful and enlightening approach of translating 'in parts'. I am truly indebted to you for your mentoring approach...be well. > Date: Fri, 8 Aug 2014 15:03:13 -0600 > From: kmedc...@dessus.com > To: sqlite-users@sqlite.org > Subject:

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Errol Emden
il.com > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] What am I doing wrong? > > On 8-8-2014 20:35, Errol Emden wrote: > > > > > > > > I am to list the film title and the leading actor for all of the films > > 'Julie Andrews' played in. T

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Keith Medcalf
On Friday, 8 August, 2014 13:46, Petite Abeille said: >On Aug 8, 2014, at 8:35 PM, Errol Emden wrote: > >> I am to list the film title and the leading actor for all of the films >'Julie Andrews' played in. > >And another one, for diversity's sake... > >Assuming a slightly different data model:

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Keith Medcalf
>I am to list the film title and the leading actor for all of the films >'Julie Andrews' played in. >The following is structure of the tables used: >movie(id, title, yr, director, budget, gross); >actor(id, name); >casting(movieid, actorid, ord). >The column name ord has a value of 1 if the ac

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Simon Slavin
On 8 Aug 2014, at 7:35pm, Errol Emden wrote: > I am to list the film title and the leading actor for all of the films > 'Julie Andrews' played in. You know, one day we should actually solve someone's homework questions. Just to mess with their head. Simon. _

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Petite Abeille
On Aug 8, 2014, at 8:35 PM, Errol Emden wrote: > I am to list the film title and the leading actor for all of the films > 'Julie Andrews' played in. And another one, for diversity’s sake… Assuming a slightly different data model: with AndrewsMovie as ( select movie_cast.movie_id from

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Simon Slavin
On 8 Aug 2014, at 7:59pm, Simon Slavin wrote: > SELECT leadActor.name, movie.title FROM casting > JOIN actor AS leadActor ON leadActor.id = casting.actorid > JOIN movie ON movie.id = casting.movieid > JOIN actor AS selectedActor ON selectedActor.id = casting.actorid > WHERE casting.ord = 1 AND s

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Simon Slavin
On 8 Aug 2014, at 7:35pm, Errol Emden wrote: > I am to list the film title and the leading actor for all of the films > 'Julie Andrews' played in. The following is structure of the tables used: > movie(id, title, yr, director, budget, gross); > actor(id, name); > casting(movieid, actorid, ord

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Luuk
On 8-8-2014 20:35, Errol Emden wrote: I am to list the film title and the leading actor for all of the films 'Julie Andrews' played in. The following is structure of the tables used: movie(id, title, yr, director, budget, gross); actor(id, name); casting(movieid, actorid, ord). The column na

[sqlite] What am I doing wrong?

2014-08-08 Thread Errol Emden
I am to list the film title and the leading actor for all of the films 'Julie Andrews' played in. The following is structure of the tables used: movie(id, title, yr, director, budget, gross); actor(id, name); casting(movieid, actorid, ord). The column name ord has a value of 1 if the actor i

Re: [sqlite] What am I doing wrong ?

2009-03-20 Thread Olivier FAURAX
Igor Tandetnik a écrit : > Olivier FAURAX wrote: >> I tried with -1 and the length value of the string, but it didn't >> help... > > Post a small complete compilable program that reproduces the problem. I > don't see anything wrong in the code you've shown - hence, the problem > is likely in the

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Igor Tandetnik
Olivier FAURAX wrote: > I tried with -1 and the length value of the string, but it didn't > help... Post a small complete compilable program that reproduces the problem. I don't see anything wrong in the code you've shown - hence, the problem is likely in the code you haven't. Igor Tandetnik

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Olivier FAURAX
oover, Jeffrey a écrit : > is autocommit on? > try adding a manual commit. > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Olivier FAURAX > Sent: Thursday, March 19, 2009 10:56 AM > To: General Discus

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Olivier FAURAX
Igor Tandetnik a écrit : > Olivier FAURAX wrote: >> I'm beginner and uses sqlite3. >> I'm trying to record informations in a database, but this fails. >> I have followed http://www.sqlite.org/c3ref/stmt.html >> >> rc = sqlite3_open(DB_FILENAME, &metadata_db); >> rc = sqlite3_exec(metadata_db, >>

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Igor Tandetnik
Olivier FAURAX wrote: > I'm beginner and uses sqlite3. > I'm trying to record informations in a database, but this fails. > I have followed http://www.sqlite.org/c3ref/stmt.html > > rc = sqlite3_open(DB_FILENAME, &metadata_db); > rc = sqlite3_exec(metadata_db, > "CREATE TABLE IF N

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Hoover, Jeffrey
is autocommit on? try adding a manual commit. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Olivier FAURAX Sent: Thursday, March 19, 2009 10:56 AM To: General Discussion of SQLite Database Subject: [sqlite] What am I doing

[sqlite] What am I doing wrong ?

2009-03-19 Thread Olivier FAURAX
Hello, I'm beginner and uses sqlite3. I'm trying to record informations in a database, but this fails. I have followed http://www.sqlite.org/c3ref/stmt.html rc = sqlite3_open(DB_FILENAME, &metadata_db); rc = sqlite3_exec(metadata_db, "CREATE TABLE IF NOT EXISTS metadata "