Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace when editing code
Message
De
12/07/2008 03:51:30
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Divers
Thread ID:
01330805
Message ID:
01330809
Vues:
13
>>>>Hi
>>>>
>>>>if I use a wildcard to search for a string in the replace dialog the code I'm looking for is highlighted but the replace doesn't work.
>>>>
>>>>Anyone got any idea why that is .
>>>>
>>>>Thanks
>>>>
>>>>
>>>>Nick Mason
>>>
>>>Could you post the command?
>>
>>Hi Boris
>>
>>I'm using the editor to change some prg code. so there's no command as such.
>
>O!
>I just tried it. Replace didn't work, but Replace All works.
>You could make a real mess with your code if you use wildcards and try to replace the string with something that has wildcard also.
>
>So That is the code where I tried it:
>
>SELECT p.OrgLevel2,;
>       p.Orglevel3,;
>       p.Orglevel4,;
>       p.Earncode,;
>       SUM(p.Hours) AS Quantity,;
>       SUM(p.Amount) As Amount,;
>       h.P_LNAME,;
>       h.P_FName,;
>       h.P_MI,;
>       h.P_SSN;
>FROM prjobcst p, hrpersnl h;
>WHERE p.COMPANY = h.P_COMPANY;
>AND p.EMPNO = h.P_EMPNO;
>AND BETWEEN(p.CHKDATE, {^2008-7-8},{^2008-7-11});
>AND h.p_level5 != 'CORP';
>AND h.p_level2 = 'NBR';
>and p_lname = 'LNAME';
>and p_fname = 'FNAME';
>GROUP BY p.OrgLevel2,;
>       p.Orglevel3,;
>       p.Orglevel4,;
>       p.Earncode,;
>       h.P_LNAME,;
>       h.P_FName,;
>       h.P_MI,;
>       h.P_SSN;
>ORDER BY p.Orglevel2, p.OrgLevel3, p.Orglevel4, h.P_SSN, p.earncode
>
>
>I search for Org* and wanted to replace it with Test* But after all I got this:
>
>SELECT p.Test*
>       p.Test*
>       p.Test*
>       p.Earncode,;
>       SUM(p.Hours) AS Quantity,;
>       SUM(p.Amount) As Amount,;
>       h.P_LNAME,;
>       h.P_FName,;
>       h.P_MI,;
>       h.P_SSN;
>FROM prjobcst p, hrpersnl h;
>WHERE p.COMPANY = h.P_COMPANY;
>AND p.EMPNO = h.P_EMPNO;
>AND BETWEEN(p.CHKDATE, {^2008-7-8},{^2008-7-11});
>AND h.p_level5 != 'CORP';
>AND h.p_level2 = 'NBR';
>and p_lname = 'LNAME';
>and p_fname = 'FNAME';
>GROUP BY p.Test*
>       p.Test*
>       p.Test*
>       p.Earncode,;
>       h.P_LNAME,;
>       h.P_FName,;
>       h.P_MI,;
>       h.P_SSN;
>ORDER BY p.Test*p.Test*p.Test*h.P_SSN, p.earncode
>
>Grrrr! :-)


I didn't try the replace all (just did after you example) yes that works.

Thanks and have a good weekend
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform