Hello All,
I can I use a SELECT INTO TempTable statement without giving System
Administrators rights to the user (Windows Authentification). If the
user is not part of the Sys Admin server role I get a message saying he
can't create a table.
What I'm trying to do is a copy of one record into the same table, with
one column different.
See code below
Thanx in advance.
<snip>
if exists (select * from dbo.sysobjects where id =
object_id(N'[TempTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [TempTable]
SET @D1_Tranche_ID = (SELECT Tranche_ID FROM tblTranche
WHERE Loan_ID = @Loan_ID)
SELECT @Loan_ID AS Loan_ID, @M1_Tranche_ID AS Tranche_ID,
tblCash_Flow.Cash_Flow_Type_ID, Entry_Date, Amount,
Deposit, Rate, ACCPAC, Actual_Interest_Rate
INTO TempTable
FROM tblCash_Flow
WHERE Tranche_ID = @D1_Tranche_ID
INSERT INTO tblCash_Flow
SELECT * FROM TempTable
DROP TABLE TempTable
</snip>
======================================
Please search the Archives before posting please.
Greetings
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!