Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT ...WHERE cCode IN (SELECT cCode FROM LocalTable)
Message
 
To
10/05/1999 23:05:42
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00217009
Message ID:
00217167
Views:
16
Cindy,

In SQL Server you just create a table with either # or ## as the beginning of the table name. # indicates a local temporary table that's only available to the session that created it. ## indicates a global temp table that's available to all sessions. A local table is released when you close the session that created it. A global table will persist until all sessions that have accessed it are closed. Let's say you wanted to create a local temporary table of states. You could do this:
SQLEXEC(nConnect,'CREATE TABLE #test (cState Char(2))')
SQLEXEC(nConnect,"INSERT INTO #test (cState) VALUES ('MA')")
SQLEXEC(nConnect,"INSERT INTO #test (cState) VALUES ('NY')")
...
You could then join #test with your permanent server table. I'm pretty sure this is specific to SQL Server, but I would suspect that Oracle has an equivalent.

>Josh,
>
>Its Oracle. It has 5 years of hospital and c
linic business office data for decision support for the individual departments. My codes are for certian office procedures (CPT codes).
>
>So how do you do it with MS SQL?
Previous
Reply
Map
View

Click here to load this message in the networking platform