Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to simplify SQL statement
Message
De
30/08/2004 10:24:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00937299
Message ID:
00937588
Vues:
9
>16 fields is an arbitrary limit set by the client. If they change it to 17, I will either jump in the lake, or will give them your name as a consultant to finish this project (just kidding). But, seriously though, it is a maximum number of equipment a conference room can have. And the limit is very reasonable so I don't think it will change.
>
>But as I was thinking/reviewing your reply, I came up with the solution. After the cursor is created with my "short" SQL statement (for the report), I will add 16 new fields to the cursor:
>EQ1SHOW, EQ2SHOW, etc. Then I will scan the cursor and populate the newly created fields EQ1SHOW, etc, from the actual fields EQ1NAME based on user selecting the equipment. Since the report will not have more than a couple of hundred records at most, I don't think the time will be a factor (the time necessary to scan the cursor second time). Does it make sense to you?
>

Or you can create the 16 fields in the SQL Select, using iif() just like you were doing, without concatenating into one long field. No extra pass needed that way.

I still think that information should be in a child table. :)

Hope you get it up an running to the client's satisfaction.
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform