Re: SQL query problem

2007-11-14 Thread Ravi Kumar.
Dear Mat, Your mail is not very clear. But I have a feeling that using '%' wildcard in the like operand should help you Regards, Ravi. On 11/14/07, Matthew Stuart <[EMAIL PROTECTED]> wrote: > > Hi, I have built a site with Dreamweaver and I have a problem with a > query. > > I am trying to

Re: SQL Query problem

2004-02-20 Thread Duncan Hill
On Friday 20 February 2004 15:19, Claire Lee wrote: > Hi All, > I have a query problem here. Say I have a table with > employee records of three different departments. If > each department manager wants to see employee info of > their own department. Three different queries will be > needed. Is the

Re: sql query problem

2001-08-17 Thread Ian Barwick
On Friday 17 August 2001 10:05, Fabian Groene wrote: > Hi, > > >The usual solution would be a subselect a la: > > > > select gname, item, gdate > >from groups > > where gdate in (select max(gdate) > > from groups > > group by gname) > > > >Alas no subselects

Re: sql query problem

2001-08-17 Thread Fabian Groene
Hi, >The usual solution would be a subselect a la: > > select gname, item, gdate >from groups > where gdate in (select max(gdate) >from groups > group by gname) > >Alas no subselects yet in MySQL (see: > http://www.mysql.com/doc/M/i/Missing_Sub-sele

Re: sql query problem

2001-08-16 Thread Ian Barwick
On Thursday 16 August 2001 10:52, Fabian Groene wrote: (snip) > My problem is quite simple indeed and only refers to the SQL query: > > > There is a table with quite a lot of columns. But only two of them are > really important for my query: One field is a date field and the other one > is a gro

Re: SQL query problem

2001-06-25 Thread Adrian D'Costa
On Fri, 22 Jun 2001, Thomas J Keller wrote: > select zip, city, county from zipcodes where zip between 68400 and 68500; > > here is a portion of the garbled output: > > |68442 | STELLA | RICHARDSON > |43 | STERLING | JOHNSON >|444 | STRANG | FILLMORE >

Re: SQL query problem with mysql.

2001-03-05 Thread Bob Hall
>hi, > >i'm writing a book (wrox publishers) which uses mysql for the sample >database. >i seem to have encountered a problem with an SQL query. >its a simple voting application, with a candidate table, and a vote table: > >create table candidate ( >candidatenumber integer not null auto_increment,

Re: SQL query problem with mysql.

2001-03-05 Thread Jason Landry
I think you really need another couple tables, even though your just writing a sample. You probably need a table named 'election' and one named 'electionparticipants' Your election table would contain things like the date of the election, the total number of votes cast, etc. The electionparticip

RE: SQL query problem with mysql.

2001-03-05 Thread Aaron Weiker
I would make the select statement look like this SELECT Candidate.FIRSTNAME, Candidate.LASTNAME, count(Votes.VoteNumber) , count(select votenumber from Votes) FROM Candidate LEFT OUTER JOIN Votes ON Candidate.CANDIDATENUMBER = Votes.CANDIDATENUMBER GROUP BY Candidate.FIRSTNAME, Candidate.LASTNAME

Re: SQL query problem

2001-01-23 Thread Peter Pentchev
On Tue, Jan 23, 2001 at 05:39:47PM +0100, Sander Pilon wrote: > Okay, here's one for the guru's out there :) > > I have a list of entries with unique id numbers X, and a set of sort methods > (S1 ... S). > > Now, if I want to get an entry at position P (0...) in the list of > entries ordered by