Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Howmuch important select field order on joins
Message
De
03/09/2005 10:53:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01046545
Message ID:
01046550
Vues:
23
Are you referring to the ORDER BY or to the order in which you specify the fields?

ORDER BY shows you the results in a certain order. You decide in what order you want the results.

I believe that the order in which you name the fields would not affect the efficiency of the query. Once again, it is mainly a matter of preference, in other words: In what order do you want to see the data when you do a BROWSE for debugging purposes?

>Hi All,
>how much important that field order on like "select..... from table left join .." SQL syntax
>
>eg. is it true order below codes
>
>
>Select Stok.skodu,Stok.sadi,Stok.birim1,;
>	Stok.barkod,depo.kod As depokodu,depo.tanim As depoadi,;
>	NVL(CrsSatFat.toplamcikan,0) As toplamcikan,;
>	NVL(CrsSatFat.SatisOrtFiyati,0) As SatisOrtFiyati,;
>	NVL(CrsSatFat.SatisOrtTutari,0) As SatisOrtTutari,;
>	NVL(CrsAlFat.toplamgiren,0) As toplamgiren,;
>	NVL(CrsAlFat.AlisOrtFiyati,0) As AlisOrtFiyati,;
>	NVL(CrsAlFat.AlisOrtTutari,0) As AlisOrtTutari,;
>	CrsAlFatMax.sonalistarihi,NVL(CrsAlFatMax.sonalisfiyati,0),;
>	NVL( Round( ( ( CrsSatFat.toplamcikan * CrsSatFat.SatisOrtFiyati ) - ;
>	( CrsSatFat.toplamcikan * CrsAlFat.AlisOrtFiyati ) ) / ;
>	( CrsSatFat.toplamcikan * CrsSatFat.SatisOrtFiyati ) * 100 , 2 ),0) As KarMarji,;
>	NVL( ( CrsSatFat.toplamcikan * CrsSatFat.SatisOrtFiyati ) - ;
>	( CrsSatFat.toplamcikan * CrsAlFat.AlisOrtFiyati ),0) As OrtalamaKar;
>	from Addbs(m.gcdata03)+'Stok';
>	left Join CrsSatFat On CrsSatFat.skodu=Stok.skodu;
>	inner JOIN Addbs(m.gcdata03)+'depo' ON depo.kod=CrsSatFat.depokodu;
>	left Join CrsAlFat On CrsAlFat.skodu=Stok.skodu ;
>	inner Join CrsAlFatMax On CrsAlFatMax.skodu=Stok.skodu;
>	ORDER By Stok.skodu;
>	INTO Cursor CrsResult1
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform