dbTalk Databases Forums  

SELECT INTO Permissions

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss SELECT INTO Permissions in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Brad Gilbert
 
Posts: n/a

Default SELECT INTO Permissions - 08-22-2003 , 02:55 PM






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!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.