Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Cecil Champenois
  Where is Cecil Champenois?
 Little Elm
 Texas - United States
 Cecil Champenois
 Tags
Subject: RE: Over-Killed Dupes in SQL Statement
Thread ID: 396048 Message ID: 396248 # Views: 30 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, January 24, 2014 12:05:00 AM         
   


> >
> >
> > Duplicate post of the above. So might as well use this for Cecil:
> >
> > Personally, I don't see that trying to fit every thing in a single SQL SELECT will be better or worse. It is not about having to look cool anyway with the source codes but to get things done properly. So in some cases, I do like yours, two SQL SELECTs.
> >
> > Anyway, I just wanted to add two not so important things on the above SQL SELECTs:
> >
> > 1. I prefer SQL's BETWEEN clause than BETWEEN() function of VFP (learned that from Anders)
> >
> >
cv.CHG_DATE BETWEEN ldBegin AND ldEnd 
> > 

> >
> > 2. Use mdots on variables to avoid ambiguity:
> >
> >
cv.CHG_DATE BETWEEN m.ldBegin AND m.ldEnd 
> > 

> >
> >
> >
> >
> >
> > https://vfpx.codeplex.com/releases/view/99045
> > http://sandstorm36.blogspot.com
>
> In all of my FoxPro years, I might have used the SQL BETWEEN in a SQL statement maybe once, I have always used the FoxPro function BETWEEN() in FoxPro SQL statements. Time to adjust.
>
> But, I must ask "What difference does it make" to use m.dots or not? (Do I sound like Hillary when she was being interviewed by a congressional panel about Benghazi?
>
> Cecil Champenois, Jr.


Some may have misconceived that the need for mdot is for speed. And because of that, there are countless arguments whether speed factor is negligent or not as can be seen on the wiki link given to you by Pete.

But while speed issue is another factor of the mdot usage, it is not actually that. Speed is only a bi-product. The real purpose of mdot usage is to remove confusion by VFP between a possible field and variable of the same name, that may cause unwanted result later.

Read this as well: http://sandstorm36.blogspot.com.au/2011/09/learning-mdot-usage-repost.html





https://vfpx.codeplex.com/releases/view/99045
http://sandstorm36.blogspot.com

ENTIRE THREAD

Over-Killed Dupes in SQL Statement Posted by Cecil Champenois @ 1/22/2014 2:29:01 PM
RE: Over-Killed Dupes in SQL Statement Posted by Tore Bleken @ 1/22/2014 3:04:05 PM
RE: Over-Killed Dupes in SQL Statement Posted by Jun Tangunan @ 1/23/2014 3:18:33 AM
RE: Over-Killed Dupes in SQL Statement Posted by Jun Tangunan @ 1/23/2014 3:18:39 AM
RE: Over-Killed Dupes in SQL Statement Posted by Cecil Champenois @ 1/23/2014 12:59:22 PM
RE: Over-Killed Dupes in SQL Statement Posted by Ali Koumaiha @ 1/23/2014 4:07:24 PM
RE: Over-Killed Dupes in SQL Statement Posted by Pete Sass @ 1/23/2014 4:07:46 PM
RE: Over-Killed Dupes in SQL Statement Posted by Cecil Champenois @ 1/23/2014 5:28:11 PM
RE: Over-Killed Dupes in SQL Statement Posted by Gene Wirchenko @ 1/23/2014 7:58:52 PM
RE: Over-Killed Dupes in SQL Statement Posted by Jun Tangunan @ 1/24/2014 12:05:00 AM
RE: Over-Killed Dupes in SQL Statement Posted by Anders Altberg @ 1/25/2014 1:31:47 AM
RE: Over-Killed Dupes in SQL Statement Posted by Christian Tabligan @ 1/25/2014 2:32:49 PM