Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL-SELECT clause not working properly at runtime
Message
From
07/02/2001 22:42:23
 
 
To
07/02/2001 17:51:38
Fausto Garcia
Independent Developer
Lima, Peru
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00473670
Message ID:
00473770
Views:
21
>Hi,
>
>I have written a SQL-SELECT clause that I use to extract data to a cursor and COPY it TO a DBF file. When I run it on the VFP environment it retrieves the data as expected, but on runtime it does not. The complete clause is:
>
>SELECT ;
>MAX(pprovpol.fecierre) AS pivote, phpoliza.numpoliz, phpoliza.codmodal,;
>pmodalid.codrease, pcligrls.nombre, pcligrls.apellid1, pcligrls.apellid2, pcligrls.tipdocid, pcligrls.numident, pcligrls.fecnacim, ;
>(phpoliza.edactuin + phpoliza.anualida)-1 AS edactuin, pcligrls.sexo, phpoliza.fecinpol AS fecinief, phpoliza.durseg, phpoliza.fecfinef,;
>IIF(phpoliza.codfpago = '9','PU',ALLTRIM(STR(phpoliza.durpri))) AS durpri, ;
>phpoliza.codfpago, phpoliza.fecefsit, phpoliza.anualida, phpoliza.moneda,;
>phpoliza.sitpoliz, IIF (phpoliza.sitpoliz = '10','NO','SI') AS vigreduc,;
>phpoliza.motsitua, phpoliza.fecanula, phpoliza.fecbaja AS fecconan,;
>phpolper.codclien;
>FROM ppolizas,phpoliza,pmodalid,phpolper,pcligrls,pprovpol;
>WHERE ppolizas.numpoliz = pprovpol.numpoliz and ;
>(ppolizas.sitpoliz = "00") and ;
>(phpoliza.numpoliz = pprovpol.numpoliz) and ;
>(phpoliza.numsuple = pprovpol.numsuple) and;
>(pmodalid.codmodal = phpoliza.codmodal) and (!EMPTY(pmodalid.codrease)) and ;
>((phpolper.numpoliz = pprovpol.numpoliz) and (phpolper.tiporela = 'A')) and;
>(phpolper.codclien = pcligrls.codclien);
>GROUP BY phpoliza.numpoliz ;
>ORDER BY phpoliza.numpoliz, phpoliza.codmodal, phpoliza.numsuple ASC ;
>INTO CURSOR cur_cartera_vig
>
>
>Any ideas on what can be happening here?

Exactly what is happening? Are you getting an error, or does the command simply not return any information?

Are you sure that your runtime support files are the same version as your development environment?

Also note that you can use the INTO TABLE clause to write the results directly to a .DBF.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform