RE: SQL Problem

2007-06-27 Thread john harvey
I think you need something that is being aggregated in the select like: Select fieldx, count(*) as total from mydata group by 1 JH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Johnson Sent: Wednesday, June 27, 2007 6:58 PM To: profox@leafe.com S

RE: SQL Problem

2007-06-27 Thread Jeff Johnson
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of john harvey > Sent: Wednesday, June 27, 2007 5:01 PM > To: [EMAIL PROTECTED] > Subject: RE: SQL Problem > > I think you need something that is being aggregated in the select

Re: SQL Problem

2007-06-28 Thread Jerry Wolper
On 27 Jun 2007 at 16:57, Jeff Johnson wrote: > I am doing a SELECT statement in VFP7: > > SELECT * FROM _dcdb INTO CURSOR csrdcdb WHERE VAL(tripdate) > > lnbegin GROUP BY LEFT(tripdate, 6) I think the problem (as John was saying) is that you have to GROUP BY a field in the resulting ta

Re: SQL Problem

2008-01-23 Thread Bernardo Stanfield
Does the problem occur if you use 0 (zero) instead of EMPTY in the IIF? - Original Message From: John Weller <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent: Tuesday, January 22, 2008 7:22:00 PM Subject: SQL Problem Hi Guys, I have a problem that is driving me nuts! I have 2 tables hol

RE: SQL Problem

2008-01-23 Thread Dave Crozier
John, Change all your joins on the Suppliers and Locations tables to be "left Joins" not "inner joins". Dave Crozier -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Weller Sent: 22 January 2008 22:22 To: profox@leafe.com Subject: SQL Problem Hi Guys

RE: SQL Problem

2008-01-23 Thread John Weller
Thanks Dave - that sorted it! I guessed it was something fairly straightforward that I just wasn't seeing!!! I'm badly out of practice these days at writing anything more complex than Select * from MyTable where x = y John Weller 01380 723235 07976 393631 > > John, > Change all your joins on t

RE: SQL Problem

2008-01-23 Thread John Weller
Thanks for replying Bernardo, as you will see from my reply to Dave all is now well. John Weller 01380 723235 07976 393631 > > Does the problem occur if you use 0 (zero) instead of EMPTY in the IIF? > > ___ Post Messages to: ProFox@leafe.com Subscrip