Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread r937
Can I do this in one query? yes add location.location_name to the GROUP BY clause ;o) � The WDVL Discussion List from WDVL.COM � To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send

Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread r937
Sadly not? happily yes, unless you added it wrong can i see the changed query? � The WDVL Discussion List from WDVL.COM � To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your

Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread r937
Don't you want to GROUP BY the company name reather than the location name? By definition, grouping by the location name will only return one row per location... the GROUP BY should include both • The WDVL Discussion List from WDVL.COM • To Join wdvltalk, Send An Email To:

Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread David Precious
On Wed, 15 Nov 2006, r937 wrote: Don't you want to GROUP BY the company name reather than the location name? By definition, grouping by the location name will only return one row per location... the GROUP BY should include both Ah, GROUP BY company, location - of course :) • The

Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread Tris
No, it did work.. but my trest data didn't have what I'd described.. Company x only had 4 offices in one city.. so I've added a few fake offices and it filters! Phew!!! cheers... Final Query === SELECT company.company_id, company.company_name, company.website,

Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread David Precious
On Wed, 15 Nov 2006, Tris wrote: No, it did work.. but my trest data didn't have what I'd described.. Company x only had 4 offices in one city..so I've added a few fake offices and it filters!Phew!!! Good stuff :) The company_name and company_website in the GROUP BY clause seems redundant to

Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread r937
this could only have come up in mysql, by the way writing this (which is what you had) -- select a, b, c, count(*) ... group by a, b is invalid in all other databases you will find that in the result set, there will be one row for each combination of a,b, but the value for c in the

Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread David Precious
On Wed, 15 Nov 2006, r937 wrote: this could only have come up in mysql, by the way writing this (which is what you had) -- select a, b, c, count(*) ... group by a, b is invalid in all other databases you will find that in the result set, there will be one row for each combination of

Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread r937
If I understand right, you're saying that using an aggregating function on a field you haven't included in the GROUP BY clause is illegal in real databases, and unpredictable in MySQL (like most things in MySQL ;) )? no, it isn't using an aggregating function on that is the problem you ~can~

Re: [wdvltalk] SQL - picking out data where duplicates exist...

2006-11-15 Thread David Precious
On Wed, 15 Nov 2006, r937 wrote: If I understand right, you're saying that using an aggregating function on a field you haven't included in the GROUP BY clause is illegal in real databases, and unpredictable in MySQL (like most things in MySQL ;) )? no, it isn't using an aggregating

[wdvltalk] Form box question

2006-11-15 Thread Portman
Hi all, Does anyone know how you create a form so that some text appears in the box (for example Name) and when you click in the box, it disappears so that your text can go there? TIA, Riva • The WDVL Discussion List from WDVL.COM • To Join wdvltalk, Send An Email To:

Re: [wdvltalk] Form box question

2006-11-15 Thread Tris
input type=text name=fieldName value=text to be removed onclick=javascript: document.formName.fieldName.value = ''; try that... On 15/11/06, Portman [EMAIL PROTECTED] wrote: Hi all, Does anyone know how you create a form so that some text appears in the box (for example Name) and when you

[wdvltalk] Form box question - RESEND (first one didn't go through)

2006-11-15 Thread Portman
Hi all, Does anyone know how you create a form so that some text appears in the box (for example Name) and when you click in the box, it disappears so that your text can go there? TIA, Riva • The WDVL Discussion List from WDVL.COM • To Join wdvltalk, Send An Email To: mailto:[EMAIL

Re: [wdvltalk] Form box question - RESEND (first one didn't go through)

2006-11-15 Thread Tris
input type=text name=fieldName value=text to be removed onclick=javascript: document.formName.fieldName.value = ''; try that... On 15/11/06, Portman [EMAIL PROTECTED] wrote: Hi all, Does anyone know how you create a form so that some text appears in the box (for example Name) and when you

Re: [wdvltalk] Form box question - RESEND (first one didn't go through)

2006-11-15 Thread Cheryl Hewitt
Riva, Try this: input type=text size=30 maxsize=100 value=Name name=NameField onfocus=if (this.value == 'Name'){this.value = '';} -Cheryl Portman [EMAIL PROTECTED] wrote: = Hi all, Does anyone know how you create a form so that some text appears in the box (for example

Re: [wdvltalk] Form box question - RESEND (first one didn't go through)

2006-11-15 Thread David Precious
On Wed, 15 Nov 2006, Cheryl Hewitt wrote: Riva, Try this: input type=text size=30 maxsize=100 value=Name name=NameField onfocus=if (this.value == 'Name'){this.value = '';} -Cheryl Cheryl beat me to it - I was going to suggest only clearing the box if the value is still the 'default'