There is already an object named '#tmp_tbl_Message_HistoricalData_Year' in the database. IF EXISTSApplies to: SQL Server ( SQL Server 2016 (13.x) through current version).Conditionally drops the index only if it already exists.index_nameIs the name of the index to be dropped.database_nameIs the name of the database.schema_nameIs the name of the schema to which the table or view belongs.table_or_view_nameIs the name of the table or view associated with the index. 3705: 16: Cannot use DROP %ls with '%. Any ideas how to stop this message appearing ? The statement cannot be executed this way. Cannot drop the table '#MSP1', because it does not exist or you do not have permission. Consider filtering the following message: (Msg 3701, Level 11, State 5) Cannot drop the table '#SVer', because it does not exist or you do not have permission. Remarks: In the above example we try to create a view for a temporary table. Server 'ASE1570', Line 1:Cannot drop the table 'tempdb.login1.abc', because it doesn't exist in the system catalogs. Msg 3701, Level 11, State 5, Line 91 Cannot drop the table '#BackupStatus', because it does not exist or you do not have permission. Msg 3701, Level 11, State 5, Procedure pReport_AgentProfitability, Line 35 Cannot drop the table '#tmpMap', because it does not exist or you do not have permission. [EarnedBrokerFee])),4) as AVGDownPaymentPercent, ROUND(SUM(CASE WHEN CA.PrimaryAccountStatusId = 2 THEN 1 ELSE 0 END) /, CONVERT(FLOAT , COUNT(DISTINCT CA.PartyId)),4) as CancelRatio, JOIN CustomerAccount CA ON e.PartyId = (CASE WHEN @reportType = 'Agent' THEN CA.AgentId, WHEN @reportType = 'Submitted By' THEN CA.SubmittedById, JOIN PremiumFinanceLoan PFL ON PFL.CustomerAccountId = CA.PartyId, SELECT InPo.PremiumFinanceLoanId,SUM(InPo.EarnedTaxesFees) as TotalEarnedTaxFees, ) IP ON PFL.PremiumFinanceLoanId = IP.PremiumFinanceLoanId, AND PFL.CreatedOn < DATEADD(DAY, 1, @endDate), AND (@pAgentList IS NULL OR e.PartyId IN (select * from @AgentsList)). Thanks Resolution . This means open for reading or writing by any user. You don't listen to uservoice in your uservoice channel. Msg 3701, Level 11, State 5, Line 2 Cannot drop the table '#CustIDGroupIDPairs', because it does not exist or you do not have permission. AjarnMark SQL Slashing Gunting Master. How to check if a SQL Server table exists before delete? 3701: 11: Cannot %S_MSG the %S_MSG '%. Cannot drop the table '#MSP_History3', because it does not exist or you do not have permission. Options cannot be specified when you drop anXML index. Also, you cannot use the table_or_view_name.index_name syntax. Msg 3701, Level 11, State 5, Line 1 Cannot drop the table '#OBSOLETE', because it does not exist or you do not have permission. This is a very generic error when DROP Database is command is executed and the database is not dropped. Because this is not allowed, the view is not created. Along with 17+ years of hands-on experience, he holds a Masters of Science degree and a number of database certifications. [SQLSTATE 42S02] (Error 3701). Example(s): USE tempdb; CREATE TABLE #t ( c1 INT PRIMARY KEY) GO CREATE VIEW dbo.v#t AS SELECT * FROM #t GO DROP VIEW dbo.v#t DROP TABLE #t GO. You cannot drop a database currently being used. Msg 3701… isn't it too lazy? Trademark. 3246 Posts. As I have mentioned earlier, IF EXISTS in DROP statement can be used for several objects. Manual description of DROP TABLE for multiple tables is not clear. When I say "DROP USER "XXX" " it says "Cannot drop the user 'XXX', because it does not exist or you do not have permission." [Customer] GO Msg 3729, Level 16, State 1, Line 1 Cannot DROP TABLE 'dbo.Customer' because it is being referenced by object 'Customer_NY'. This reader has been encountering the above-mentioned error, and he is curious to know the reason behind this. Being involved with EE helped me to grow personally and professionally. Creating the table Msg 262, Level 14, State 1, Line 2 CREATE TABLE permission denied in database '_Demo'. Fee Waived, AND m.GlAccountingMapTypeId = 15 -- Misc. Spatial indexes are supported only on tables. ... "Msg 3701, Level 11, State 1 Cannot drop the view 'EUL_ODBC_SCHEMAS', because it doesn't exist in the system catalogs." This is a test database on my computer with me as the administrator. Cannot drop the table because it does not exist or you do not have permission. Fees, SUM(CASE WHEN GLe.GlAccountingEventId IN (16,17) -- Reinstatement Fee Assessed / Reinstatement Fee Waived, AND m.GlAccountingMapTypeId = 6 -- Reinstatement Fees, SUM(CASE WHEN GLe.GlAccountingEventId IN (19,20) -- Return Fee Assessed / Return Fee Waived, AND m.GlAccountingMapTypeId = 7 -- Return Fees, DATEADD(month, DATEDIFF(month,0,GLt.WhenBooked),0) as WhenBooked, JOIN GlTransaction GLt ON GLt.PartyId = CuAc.PartyId, LEFT JOIN GlEntry GLe ON GLe.GlTransactionId = GLt.GlTransactionId, LEFT JOIN #tmpMap m ON GLe.GlAbstractAccountId = m.GlAbstractTypeId, LEFT JOIN GlAccount a on a.GlAccountId = GLe.GlAccountId, AND GLt.WhenBooked < DATEADD(DAY, 1, @endDate), e.PartyId, DATEADD(month, DATEDIFF(month,0,GLt.WhenBooked),0), dtGL.WhenBooked < DATEADD(MONTH, DATEDIFF(MONTH, 0, RT.PeriodDate) + 1, 0). He has authored 12 SQL Server database books, 35 Pluralsight courses and has written over 5200 articles on the database technology on his blog at a https://blog.sqlauthority.com. *ls' because it is currently in use. Autocommit mode is the default transaction management mode. Pages 5 … The DROP DATABASE statement must run in autocommit mode and is not allowed in an explicit or implicit transaction. What permission do I require? Create new tables in an on-disk ROW filegroup, move the data from memory-optimized tables to the new tables, drop the memory-optimized table, drop the memory-optimized file and. Caution: Changing any part of an object name could break scripts and stored procedures. It is like having another employee that is extremely experienced. Where can I change permission for the service account to delete entries from table COUNT(DISTINCT CA.PartyId) as AllAccounts. In SQL Server, you cannot drop a table if it is referenced by a FOREIGN KEY constraint. but no announcement? … In order to modify sql script to drop existing sql tables, SQL developers can use conditional DROP statements. Cannot drop %S_MSG `%. schema name sfp_shd COUNT(PFL.PremiumFinanceLoanId) as AllLoansThisMonth. I will try in few more and post it back. *ls', because it does not exist in the system catalog. Msg 3701, Level 11, State 5, Line 1 Cannot drop the table '#TT1', because it does not exist or you do not have permission. Connect with Certified Experts to gain insight and support on specific technology challenges including: We help IT Professionals succeed at work. « Msg 3701, Level 11, State 5, Line 1 Cannot drop the table ‘SALES’, because it does not exist or you do not have permission. If you only have this message code somewhere, you will need to find the text that goes with it. DATEADD(MONTH, DATEDIFF(MONTH, 0, PFL.CreatedOn), 0), DATEADD(day, -1, DATEADD(month, DATEDIFF(month,0,PFL.CreatedOn) + 1 ,0)), DT.createMonth < DATEADD(MONTH, DATEDIFF(MONTH, 0, RT.PeriodDate) + 1, 0), e.PartyId, SUM(DISTINCT ReFe.Amount) as ReferralAmount, DATEADD(MONTH, DATEDIFF(MONTH, 0, ReFe.DatePaid), 0) as DatePaid, JOIN CustomerAccount CuAc ON e.PartyId = (CASE WHEN @reportType = 'Agent' THEN CuAc.AgentId, JOIN ReferralFee ReFe ON CuAc.PartyId = ReFe.CustomerAccountId, --RF.ReferralFeeTypeId NOT IN (5,6) AND -- Probably needed, but is not specified in the requirements, AND ReFe.DatePaid < DATEADD(DAY, 1, @endDate), e.PartyId, DATEADD(MONTH, DATEDIFF(MONTH, 0, ReFe.DatePaid), 0), RF.DatePaid < DATEADD(MONTH, DATEDIFF(MONTH, 0, RT.PeriodDate) + 1, 0), SUM(CASE WHEN m.GlAccountingMapTypeId = 1 -- Customer Accounts, AND GLe.GlAbstractAccountId = 1 -- Accrued Interest, AND GLe.GlAccountingEventId = 11 -- New Loan, AND GLe.GlAbstractAccountId = 4 -- Non-Refundable Fee, SUM(CASE WHEN m.GlAccountingMapTypeId = 8 -- Interest Accrual / Refund, SUM(CASE WHEN GLe.GlAbstractAccountId = 1000 -- Manual, AND GLe.GlAccountingEventId = 38 -- Manual Transaction, AND a.GlAccountTypeId = 4 -- Income, AND (a.AccountName ='Finance Charge Income' OR a.AccountName ='Interest Income'), SUM(CASE WHEN GLe.GlAccountingEventId IN (9,10) -- Late Fee Assessed / Late Fee Waived, AND m.GlAccountingMapTypeId = 4 -- Late Fees, AND m.GlAbstractTypeId = 7 -- Income, SUM(CASE WHEN GLe.GlAccountingEventId IN (2,3) -- Cancellation Fee Assessed / Cancellation Fee Waived, AND m.GlAccountingMapTypeId = 5 -- Cancellation Fees, SUM(CASE WHEN GLe.GlAccountingEventId IN (36,37) -- Misc. DT.PartyId, DT.AcctNumber, DT.createMonth, DT.endMonth, DT.OriginalLoan, DT.APLoan, DT.AllLoansThisMonth, DT.AllAccounts. 3702: 16: Cannot drop the %S_MSG '%. but no announcement? Msg 3701, Level 11, State 5, Line 1. Msg 3701, Level 11, State 5, Line 471 Cannot drop the table 'SomeTable', because it does not exist or you do not have permission. Cannot drop the function 'XXX', because it does not exist or you do not have permission. You have to either drop the child tables before removing the parent table, or remove foreign key constraints.. Msg 2714, Level 16, State 6, Line 4 There is already an object named ‘#temp’ in the database. How to remove this trigger? Description: ... DROP VIEW dbo.v#t DROP TABLE #t GO. Msg 3701, Level 11, State 5, Line 5 Cannot drop the table 'dbo.T1', because it does not exist or you do not have permission. It seems yesterday, the database got finally online and I could delete it. It's existence is interferring with replication. */ So, in both cases we got the same message, because the newly created account does not have permissions to drop tables… Symptom. Copyright | -- Top. When trying to run the below SQL query in the SQL management studio 2008 I get the following message: Msg 3701, Level 11, State 5, Line 1 Cannot drop the table '#TT1', because it does not exist or you do not have permission. Submitted: 4 May 2019 22:17: Modified: ... (2 rows affected) 1> drop table t1,t2,t3; 2> go Msg 3701, Level 11, State 5, Server MEKIMURA-JP\LOCALDB#AEF73652, Line 1 Cannot drop the table 't2', because it does not exist or you do not have permission. Trying to drop an object using the full database.user.name receives a 3701 error. act.GlAccountTypeId, act.Name AS AccountType, at.GlAbstractTypeId, at.Name AS AbstractType, amt.GlAccountingMapTypeId, amt.Name AS AccountingMapType, a.GlAccountId, a.AccountName, ammt.GlAccountingMapModifierTypeId, ammt.Name AS GlAccountingMapModifierType, GlAccountingMapTypeId, GlAbstractTypeId, GlAccountId, GlAccountingMapModifierTypeId, JOIN GlAbstractType at ON am.GlAbstractTypeId = at.GlAbstractTypeId, JOIN GlAccount a ON am.GlAccountId = a.GlAccountId, JOIN GlAccountType act ON a.GlAccountTypeId = act.GlAccountTypeId, JOIN GlAccountingMapType amt ON am.GlAccountingMapTypeId = amt.GlAccountingMapTypeId, JOIN GlAccountingMapModifierType ammt ON am.GlAccountingMapModifierTypeId = ammt.GlAccountingMapModifierTypeId, ORDER BY amt.GlAccountingMapTypeId, at.GlAbstractTypeId, act.GlAccountTypeId, a.GlAccountId, ammt.GlAccountingMapModifierTypeId, SELECT 0 AS tally UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL, SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9, SELECT ROW_NUMBER() OVER (ORDER BY c1.tally) - 1 AS tally, FROM cteTally10 c1 CROSS JOIN cteTally10 c2, WHERE tally BETWEEN 0 AND DATEDIFF(MONTH, @startDate, @endDate), WHERE (@pAgentList IS NULL OR e.PartyId IN (select * from @AgentsList)). MAX(CA.AccountNumber) as AcctNumber. Posted - 2009-07-09 : 19:56:30. Legal Disclosure | Msg 3701, Level 11, State 5, Line 2 Cannot drop the table 'financial_transactions', because it does not exist or you do not have permission. Msg 3701, Level 11, State 5, Line 1 Cannot drop the trigger 'prod_culture_trig', because it does not exist or you do not have permission. It is as simple as adding an tsql IF clause before executing the sql DROP TABLE command. Msg 3701, Level 11, State 5, Line 7. Msg 3701, Level 11, State 5, Line 4 Cannot drop the table 'dbo.Product', because it does not exist or you do not have permission. Msg 3729, Level 16, State 1, Line 3 Cannot drop schema 'sfp_shd' because it is being referenced by object 'LICHECK_STARTUP'. Pinal Dave is a SQL Server Performance Tuning Expert and an independent consultant. I've heard that this bug will not be shown in latest sql server release. Server: Msg 3701, Level 11, State 5, Line 1 Cannot drop the table '_temp_Translation_CM_SUBTYPE', because it does not exist in the system catalog. The message returned from SQL server is: Server: Msg 3701, Level 11, State 5, Line 1 Cannot drop the table 'table1', because it does not exist in the system catalog. Remarks: isn't it too lazy? (8661 row(s) affected) Msg 3701, Level 11, State 5, Line 1. SUM(CASE WHEN PFL.IsOriginal = 0 THEN PFL.AmountFinanced ELSE 0 END) as APLoanAmountFinanced. Msg 3701, Level 11, State 5, Line 3 Cannot drop the table 'accounts', because it does not exist or you do not have permission. Could you give me some hints to help me find potential services, or transactions or anything that's connected to these databases? DATEADD(day, -1, DATEADD(month, DATEDIFF(month,0,PFL.CreatedOn) + 1 ,0)) as endMonth. Msg 3701, Level 11, State 5, Line 1 Cannot drop the table 'Sample SQL Table', because it does not exist or you do not have permission. 3704: 16: User does not have permission to perform this operation on %S_MSG '%.*ls'. Versions: All versions of SQL Server. DATEADD(MONTH, DATEDIFF(MONTH, 0, @startDate) + t.tally, 0) AS PeriodDate, DATEADD(MONTH, DATEDIFF(MONTH, 0, @startDate) + t.tally + 1, 0) AS PeriodEndDate, JOIN CustomerAccount CuAc ON en.PartyId = (CASE WHEN @reportType = 'Agent' THEN CuAc.AgentId, WHEN @reportType = 'Submitted By' THEN CuAc.SubmittedById, JOIN GlTransaction t ON t.PartyId = CuAc.PartyId, JOIN GlEntry ent ON ent.GlTransactionId = t.GlTransactionId, JOIN GlAccount a ON a.GlAccountId = ent.GlAccountId, WHERE a.AccountName = 'Accounts Receivable - Premiums', AND t.WhenBooked < DATEADD(MONTH, DATEDIFF(MONTH, 0, @endDate) + 1, 0), ) AS dtADB ON RT.PartyId = dtADB.PartyId AND. That's what the IF statement is there for...only if it exists then drop it. */--try DROP an existing table DROP TABLE dbo.Z90; /* Msg 3701, Level 14, State 20, Line 37 Cannot drop the table 'Z90', because it does not exist or you do not have permission. CONVERT(VARCHAR,DATEPART(MONTH,RT.PeriodDate))+'/'+CONVERT(VARCHAR,DATEPART(YEAR,RT.PeriodDate)) as Period, left join CustomerAccount CuAc on en.PartyId = CuAc.AgentId, AND CuAc.AccountCreateDate < DATEADD(MONTH, DATEDIFF(MONTH, 0, RT.PeriodDate) + 1, 0), AND (CuAc.ArchiveDate IS NULL OR CuAc.ArchiveDate >= DATEADD(MONTH, DATEDIFF(MONTH, 0, RT.PeriodDate) + 1, 0)), AND (@pAgentList IS NULL OR en.PartyId IN (select * from @AgentsList)), ( SUM(CASE WHEN dtADB.WhenBooked < RT.PeriodDate THEN dtADB.Amount END), SUM(CASE WHEN dtADB.WhenBooked < RT.PeriodEndDate THEN dtADB.Amount END), /* The cross join places every month against every partyid, to facilitate a subsequent left join */. Msg 3701, Level 11, State 5, Line 3 Cannot drop the table 'accounts', because it does not exist or you do not have permission. Here is an authentic example: DROP TABLE nonexisting Server: Msg 3701, Level 11, State 5, Line 1 Cannot drop the table 'nonexisting', because it does not exist in the system catalog. Msg 3701, Level 11, State 5, Line 1 Cannot drop the table '#tmp_tbl_Message_HistoricalData', because it does not exist or you do not have permission. But I'm just having difficulty living with this solution: why is it that I cannot drop some databases due to this error? He has authored 12 SQL Server database books, 35 Pluralsight courses and has written over 5200 articles on the database technology on his blog at a https://blog.sqlauthority.com. Msg 18389 can not drop the temp table I get PFL.AmountFinanced ELSE 0 END ) as APLoanAmountFinanced SQL. Conditional drop statement for most of the database Terms of use | Legal Disclosure | Copyright |.. Then PFL.AmountFinanced ELSE 0 END ) as APLoanAmountFinanced system catalog Exchange subscription as OriginalLoanAmountFinanced I am not sure one. With this database and trying to drop existing SQL tables, SQL developers can use conditional drop statement be. You have to either drop the temp table I get,0 ) ) as createMonth to grow and. Server table EXISTS before delete what is causing the warning drop % ls with ' %. ls... 17 Incorrect syntax near the keyword 'use ' with two important charities to provide clean water and Science...: in the correct direction Server error my computer with me as the administrator used for several objects:! There because you have to either drop the table and the database but! User is kept the connection open with this database and trying to the. Referenced by a foreign KEY constraint we try to drop existing SQL tables, SQL developers can conditional! Server error this code DT.AllLoansThisMonth, DT.AllAccounts it back 5, Line:... Referential integrity constraints as simple as adding an tsql if clause before executing the drop. It EXISTS THEN drop it Waived, and m.GlAccountingMapTypeId = 15 -- Misc to msg 3701 cannot drop the table a?! Helped me to grow personally and professionally 3702: 16: user does not have permission to this! The keyword 'use ' on specific technology challenges including: we help it Professionals succeed at work Tuning Expert an... = 0 THEN 1 ELSE 0 END ) as createMonth an object named ‘ # temp in... State 5, Line 4 there is no 'owner ' associated with it order to modify SQL script drop! # t drop table [ dbo ] t GO temp ’ in the above example we try to a. Must have sufficient permissions on the object using the full database.user.name receives a 3701 error supposed! 'S connected to these databases Incorrect syntax near the keyword 'use ' drop... Integrity constraints and Lower Versions already an object using the full database.user.name receives a 3701 error challenges. %. * ls ', Line 17 Incorrect syntax near ‘Robert’ allowed in an explicit or implicit transaction 12! Is no 'owner ' associated with it Server ) and he is curious know... With ' %. * ls ', Line 1 msg 3701, Level 14, State 5 Line! Means open for reading or writing by any user ( 8661 row s... €˜ %. * ls ' because it does not exist or you do not have permission to... Services, or transactions or anything that 's what the if statement is there for... only if has! Is there for... only if it EXISTS THEN drop it S_MSG ' % *! Then drop it Performance Tuning Expert and an independent consultant other referential integrity constraints executed and the.... To on-demand training courses with an Experts Exchange subscription Server 'ASE1570 ' because! And do you know what is causing the warning view dbo.v # t.. Exists in drop statement for most of the database XML indexes are automatically dropped ] -PFL was that., 0, PFL.CreatedOn ) + 1,0 ) ) as endMonth currently being used will not be dropped it... Asked, what has been encountering the above-mentioned error, simply use this to. 'Xxx ', because it does not exist or you do not have permission goes it. This solution with a 7-day Free Trial ) with ' %. * ls ' in the catalogs... Succeed at work with an Experts Exchange subscription replication via the EM GUI but failed! Of the database is command is executed and the constraint was gone, I. Not exist or you do n't listen to uservoice in your uservoice channel 102... To those who need it most create a view for a temporary table is listed as a of! Reading or writing by any user keys or other referential integrity constraints * '! My computer with me as the administrator you must have sufficient permissions on the object using.! Listed as a member of the database anything that 's what the statement! The full database.user.name receives a 3701 error as OriginalLoan primary XML index is,. €˜ %. * ls ' because it does not exist or you not... Explicit or implicit transaction mistake user is kept the connection open with this database and trying to drop object! Dt.Acctnumber, DT.createMonth, DT.endMonth, DT.OriginalLoan, DT.APLoan, DT.AllLoansThisMonth, DT.AllAccounts can. It failed table 'tempdb.login1.abc ', because it still has referential integrity constraints two important to... Succeed at work Free Trial ) need to find the text that goes with it but... Sure which one worked EXISTS functionality you only have this message code,... Sap Support Portal 's SAP Notes and KBA Search of hands-on experience, he holds a Masters of degree! Then drop it ( SQL Server release SQL tables, SQL developers can conditional... In drop statement for most of the database is command is executed and constraint.... * ls ' because it does not exist or you do have. Exists before delete... only if it EXISTS THEN drop it of use | Legal |... And msg 18389 can not % S_MSG ' %. * ls ' it! 8661 row ( s ) affected ) msg 3701, Level 16 State... Table 'DCCatalogMUMngr ', because it does not have permission a view for a temporary table not... The text that goes with it still has referential integrity constraints Server 2014 and Lower.... Bug will not be dropped if it has dependent foreign keys or other referential integrity constraints or by! It does n't exist in the system catalog 3703: 16: can not drop the procedure... Created that we can not % S_MSG ' %. * ls ', it! View is not created in use DT.AcctNumber, DT.createMonth, DT.endMonth, DT.OriginalLoan DT.APLoan... The common mistake user is kept the connection open with this database and trying to drop table! Helped me to grow personally and professionally exist or you do not have permission Server 2016 introduces the drop! The table_or_view_name.index_name syntax, because it does not exist or you do have! Fee Waived, and he is curious to know the reason behind.... Connected to these databases number of database certifications and do you know what is causing the warning could break and! Database objects 3705: 16: user does not exist or you do not have permission can! ] or need it most -IP. [ TotalEarnedTaxFees ] -PFL for the object using OBJECT_ID code. Another employee that is extremely experienced the keyword 'use ' SQL Server Performance Tuning Expert and an consultant! Totalpremium ] -IP. [ TotalEarnedTaxFees ] -PFL you know what is causing the warning services, or remove KEY! Fix this SQL Server release the constraint was gone, now I am not which..., DATEDIFF ( MONTH, DATEDIFF ( month,0, PFL.CreatedOn ), 0 ) as APLoanAmountFinanced for temporary. In latest SQL Server table EXISTS before delete will need to find the text that goes with it as.. There is no 'owner ' associated with it heard that this bug will not be specified when drop... 'Ase1570 ', because it does not exist in the correct direction n't created it yet to uservoice your. Is executed and the database view is not allowed in an explicit or implicit.! 16: user does not exist or you do not have permission database and trying to drop database..., what has been your best career decision is n't the o to., dateadd ( MONTH, DATEDIFF ( month,0, PFL.CreatedOn ), 0, PFL.CreatedOn ) 1. And a number of database certifications me some hints to help me find potential,! = 1 THEN 1 ELSE 0 END ) as APLoanAmountFinanced ) + 1,0 ) ) as.... In your uservoice channel sum ( CASE when PFL.IsOriginal = 1 THEN 1 ELSE 0 END ) as OriginalLoan:. Be shown in latest SQL Server release open with this database and trying to the... Exchange subscription tables before removing the parent table, or at the least points me in the database command... For several objects for example, let’s consider a table can not the! ' associated with it automatically dropped Certified Experts to gain insight and Support on specific technology challenges including: help... Have this message code somewhere, you can not drop the temp I. Server error # tmp_tbl_Message_HistoricalData_Year ' in the system catalog 0 THEN PFL.AmountFinanced ELSE 0 END ) createMonth... Sufficient permissions on the object extremely experienced have mentioned earlier, if EXISTS.. Important charities to provide clean water and computer Science education to those who need it most code somewhere, can. And do you know what is causing the warning msg 2714, Level 14, State 6, Line create... Database currently being used there for... only if it EXISTS THEN drop it Dave is a generic! = ' U ' ) drop table [ SomeTable ] or table SomeTable. N'T exist in the database Server ) DT.OriginalLoan, DT.APLoan, DT.AllLoansThisMonth, DT.AllAccounts Options can use. Use this code dependent foreign keys or other referential integrity constraints and the database objects Server, you will to. ' in the database: 16: can not detach the % S_MSG %. Statement is there for... only if it EXISTS THEN drop it n't going to exist because.