Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query doesn't respect order of fields
Message
De
01/06/2007 09:42:59
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
01/06/2007 09:07:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 5
Divers
Thread ID:
01229764
Message ID:
01229779
Vues:
8
>>>Hi All,
>>>
>>>I'm writing a query witn an output to a table that already exists. Strange thing is that the order of the fields is not equal to the order as it is written in the query. It place the fields in alphabetic order in stead of how it is written.
>>>
>>>For example:
>>>
>>>Select  aveld, cveld, bveld from klm into table outputklm
>>>
>>>
>>>I get the following order in the output table aveld, bveld, cveld. How could I solve this?
>>>
>>>Thanks beforehand
>>
>>You shouldn't rely in the order of fields in your code.
>>
>>However if you really need it, are you sure you're looking at the correct table?
>>
>>PS: You're saying to a table that already exists but creating a new one with select.
>>Cetin
>
>I have never seen that you can't rely on the order of fields in the code, neither in fox nor in SQL Server. AFAIK it's completely reliable. Am I mistaken?
>
>Lennert

Lennert,
It depends on how you accept it. What I meant is code like:

select * from myTable into array aSomething
? "FirstName is:" + aSomething[1,5]

This code simply assumes that nobody would change the table's structure and firstName would always be in 5th position.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform