Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with SQL statement
Message
 
 
To
23/09/1999 08:09:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00267805
Message ID:
00267936
Views:
24
>SELECT iif(nvl(Checkinout.lflag,.F.),"Y","") as lflag,;
> Tapelib.ntapeid, Tapelib.ctitle, Tapelib.ddatep_a, Tapelib.cttyp,;
> Tapelib.ctrt, Projects.cproj_num, Projects.cproj_title,;
> Projects.cproducer, Projects.cclient, Tapelib.clanguage, Tapelib.cformat,;
> Tapelib.ccategory, Tapelib.lcc, Tapelib.mnotes, Tapelib.ctl_index;
> FROM rsrc!projects INNER JOIN rsrc!tapelib;
> LEFT OUTER JOIN rsrc!checkinout ;
> LEFT OUTER JOIN rsrc!featper ;
> ON Tapelib.ctl_index = Featper.ctl_index ;
> ON Tapelib.ctl_index = Checkinout.ctl_index ;
> ON Projects.cmaster_index = Tapelib.cmaster_index;
> WHERE &running; && I construct this interactively
> GROUP BY Tapelib.ntapeid;
> ORDER BY Tapelib.ntapeid;
> INTO CURSOR search
>

Let's go 1 step at a time. First, un-nest the JOINS:
FROM  rsrc!projects ;
    INNER JOIN rsrc!tapelib ;
       ON Projects.cmaster_index = Tapelib.cmaster_index ;
    LEFT OUTER JOIN rsrc!checkinout ;
       ON Tapelib.ctl_index = Checkinout.ctl_index ;
    LEFT OUTER JOIN rsrc!featper ;
      ON Tapelib.ctl_index = Featper.ctl_index...
You will no longer be able to use the View Designer. I have a script PRG file that I can run at any time to recreate any view. I also use Erik Moore's eView utility to generate all the code needed for existing views [including all the CursorSetProp and DBSetProp commands]. eView can be found in the Files section.

Second, in your IIF() statement, make sure the false value is a blank space [i.e., make sure this a space between your quotes].
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform