Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT equiv of RECNO in SQL Server & use no. in the tempta
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
MS SQL Server
Divers
Thread ID:
01155452
Message ID:
01155475
Vues:
42
This message has been marked as the solution to the initial question of the thread.
>Hi Borislav
>
>>How you create Temp table?
>
>My favourite way is as follows:
>
	=SQLEXEC(lnSQLHandle, "DROP TABLE #outcome", "outcome")
>	TEXT TO lcSQL NOSHOW TEXTMERGE
>		SELECT ...
>		   INTO #outcome
>		   FROM ...
>		   WHERE ...
>	ENDTEXT
>	=SQLEXEC(lnSQLHandle, lcSQL, "outcome")
Then use:
	=SQLEXEC(lnSQLHandle, "DROP TABLE #outcome", "outcome")
	TEXT TO lcSQL NOSHOW TEXTMERGE
		SELECT ...,
                   IDENTITY(int, 1, 1) AS Rec_No
		   INTO #outcome
		   FROM ...
		   WHERE ...
	ENDTEXT
	=SQLEXEC(lnSQLHandle, lcSQL, "outcome")
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform