Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Something not clear about #Temp tables
Message
From
12/10/2006 16:37:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
12/10/2006 14:14:14
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01161543
Message ID:
01161568
Views:
15
>Hello, Just to finally understand something and try to find a workaround.
>
>
>SP1 runs "Exec SP2"
>
>SP2 creates a temporary table, say "Select * into #Temp1 from AnyTable"
>
>SP1 needs to use #Temp1, but it seems that SP2 is a separate batch? The #Temp1 table no longer exists.
>
>
>We want to create a temporary table in the called procedure SP2, but the scope must be extended to the calling procedure SP1.
>
>We could create non-temp tables, but of course we don't want to worry about assigning the unique name or deleting de table after use.
>
>Any ideas how you implement this?
>
>Thanks,
>Juan C.

Juan,
It wouldn't work that way. However there is a better way IMHO. Create functions that return a table. Check for "create function" in SQL BOL. You can have inline or multistatement tablevalued tables that would do just what you want.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform