Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT equiv of RECNO in SQL Server & use no. in the tempta
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01155452
Message ID:
01155475
Views:
40
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform