Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why do i get exp_1, exp_2, etc. as col headers in sql ou
Message
De
17/02/2001 15:05:33
 
 
À
17/02/2001 14:56:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00477026
Message ID:
00477028
Vues:
35
I'm replying to my own post, but I'm still confused. I did a search on exp_1. Others have commented on this. The point that some others made is that if you are using a constant or a literal that VFP will give the name exp_1, for expression_1. That makes sense, but one other post described a situation similar to mine. In both the cases, mine and his (don't have thread # - sorry) I can't see why the value is consider an expression, not a field name

>The last in a series of sql statements writes to a table called final. In final, my column headers are listed as exp_1, exp_2, etc. on up to 9. I don't know why the original column names are not listed. Forcing an override with, for example 'select surveyans.mintro as mintro, fixes the problem. But what is the source of the problem.
>
>The SQL is:
>
>lc_responseid= '00000_0BG0ZFNPS'
>SELECT surhdr.csurid, surhdr.mintro, surhdr.csurdescrip, surques.csurqno, surques.csurqtxt, ;
> surques.csurqmid,surques.csurqtyp, surques.csection, surques.csecqno FROM SURHDR, SURQUES ;
> WHERE SURHDR.CSURID=SURQUES.CSURID INTO TABLE surveydef
>
>SELECT surveydef.csurid,surveydef.mintro,surveydef.csurdescri,surveydef.csurqno,surveydef.csurqtxt, ;
>surveydef.csurqmid,surveydef.csurqtyp,surveydef.csection,surveydef.csecqno,surans.cansid,surans.cansans, ;
>surans.cansansm,surans.canstyp ;
>FROM surveydef, SURANS WHERE surveydef.CSURQNO=SURANS.CSURQNO INTO TABLE surveyans
>
>select resphdr.cresphdrid,resphdr.drespdate,resphdr.cadminid,resphdr.cagentid,resphdr.csurid, ;
>resphdr.crespnamid,resphdr.crespcoid,resphdr.mnotes,resphdr.cinterid,resphdr.crespconam, ;
>resphdr.crespfname,resphdr.cresplname,respdtl.cresponse,respdtl.mresponse,respdtl.csurqno, ;
>respdtl.csection ;
>from resphdr, respdtl ;
>where resphdr.cresphdrid=respdtl.cresphdrid and resphdr.cresphdrid = lc_responseid ;
>into table responses
>
>select surveyans.mintro, surveyans.csurdescri,surveyans.csurqtxt,surveyans.csurqmid,surveyans.csurqtyp,;
>surveyans.csecqno,surveyans.cansid,surveyans.cansans,surveyans.cansansm,surveyans.canstyp ;
>from surveyans outer join responses on surveyans.csurqno = responses.csurqno into table final
>
>*Please not that if i replace the sql above that creates the final table with the same statement except for: select * from surveyans ...(rest same), it works fine
>
>TIA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform