Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Keith Patterson
  Where is Keith Patterson?
 Roanoke
 Virginia - United States
 Keith Patterson
Subject: RE: SQL help needed
Thread ID: 161243 Message ID: 161250 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Errors & Debugging
Date: Thursday, February 21, 2008 9:58:02 PM         
   



> Mike,
>
> I work alone now and miss having the extra set of eyes to point out the obvious for me.
>
> Thank you so very much for being my extra eyes today.
>
> Adding the required comma made everything work just fine.
>
> Thanx.
>
> Keith
>
> > Hi Keith
> >
> > There is a comma missing after remanum AS MANbr
> >
> >
> >
> >
> > Mike Yearwood
> > www.foxridgesoftware.com
> > President: Toronto Ontario FoxPro User's Group

Keith,

If Mike's reply was helpful, perhaps you could take the time to give him a rating. Just click on his reply and then click the "rate this" link at the bottom of the message header. When you give a rating, not only do you show appreciation, you also inform other members (who could be facing a similar sort of problem) that Mike's reply was helpful to you and could therefore be helpful to them.

I find it helpful to "beautify" long select statements as follows:
SELECT reresid, ;
       refname AS ResFirstName, ;
       remiddle AS ResMiddle, ;
       relname AS ResLastName, ;
       ressn AS ResSSN, ;
       resex AS ResSex, ;
       redob AS ResDOB, ;
       remcnum AS MCNbr, ;
       remanum AS MANbr ;  && <<<<< Missing Comma
       rcfname as RespFirstName, ;
       rcmiddle AS RespMiddle, ;
       rclname AS RespLastName, ;
       rcaddress AS RespAddress, ;
       rccity AS RespCity, ;
       rcstate AS RespState, ;
       rczipcode as RespZip, ;
       rcphone AS RespPhone, ;
       rcrelat AS RespRelation ;
   FROM mbres13, ;
        mbrcon13 ;
   WHERE reresid = "somenumber" AND ;
         rcresid = reresid


Makes it a lot easier to spot the missing comma. The hardest thing to find is often the thing that is not there.

Also, when you post code, please use the code tags < vfp > code goes here < /vfp > (without the spaces) or select your code with the mouse and then click the "Code tags" button in the Foxite toolbar (just to the left of the "bold" button when editing or creating a post.) It makes it much easier for us old fellows to read - the eyes are the first thing to go - or was that "the memory is the first thing to go" - can't quite remember ... :)

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

SQL help needed Posted by Keith Patterson @ 2/21/2008 7:26:46 PM
RE: SQL help needed Posted by Mike Yearwood @ 2/21/2008 7:30:51 PM
RE: SQL help needed Posted by Keith Patterson @ 2/21/2008 8:08:15 PM
RE: SQL help needed Posted by Ken Murphy @ 2/21/2008 9:58:02 PM