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?