|
jjamjatra
Starting Member
13 Posts |
Posted - 2004-07-14 : 16:32:19
|
| I'm trying to run Alter Procedure in Query Analyzer on my development server where I am logged on locally. I am getting this error:Could not process object 'Create Table xxxxMasterScratchPad.dbo.LoanMasterNEW ( StateCD varchar (2) NULL , CountyCD varchar (3) NULL , SaleMnYear datetime NULL , LenderName varchar (40) NULL , MDSID varchar (6) NULL , Amt_PUR int NULL , Nbr_MTG int NULL , Amt_MTG int NULL , Nbr_JUMBO int NULL , Amt_JUMBO int NULL , Nbr_GOVT int NULL , Amt_GOV...OLE DB error trace [Non-interface error: OLE DB provider unable to process object, since the object has no columnsProviderName='SQLOLEDB', Query=Create Table xxxxMasterScratchPad.dbo.LoanMasterNEWUsing this same connection, I previously did:exec sp_linkedserversexec sp_addlinkedsrvlogin @rmtsrvname='MDWDBSERVER', @useself=Trueselect top 10 mdsid, lendername from MDWDBServer.xxxxMasterScratchPad.dbo.LenderNames order by 2 ..and this worked fine. In short, I have this stored procedure that I want to be able to live on both my development SQL server PC and on my production SQL server PC. In the sProc itself, I want to always use a particular database on the production server (because it has a lot of space). Here is a snippet from the sProc:if @DataType = 1 /* Purchase */BeginSELECT * FROM OPENQUERY(MDWDBServer, 'Create Table xxxxMasterScratchPad.dbo.LoanMasterNEW ( StateCD varchar (2) NULL , CountyCD varchar (3) NULL , SaleMnYear datetime NULL , LenderName varchar (40) NULL , MDSID varchar (6) NULL , Amt_PUR int NULL , Nbr_MTG int NULL , Amt_MTG int NULL , Nbr_JUMBO int NULL , Amt_JUMBO int NULL , Nbr_GOVT int NULL , Amt_GOVT int NULL , Nbr_Fixed int NULL , Nbr_ARMS int NULL , Nbr_NewConst int NULL , Amt_Fixed int NULL , Amt_ARMS int NULL , Amt_NewConst int NULL , Nbr_Below80 int NULL , Nbr_80_85 int NULL , Nbr_85_90 int NULL , Nbr_Above90 int NULL , Official_Name varchar (60) NULL , SMSA_CD varchar (4) NULL ) INSERT INTO xxxxMasterScratchPad.dbo.LoanMasterNEW SELECT StateCD, CountyCD, SaleMnYear, LenderName, MDSID, Sum(Amt_PUR), Sum(Nbr_MTG) , Sum(Amt_MTG) , Sum(Nbr_JUMBO) , Sum(Amt_JUMBO), Sum(Nbr_GOVT) , Sum(Amt_GOVT) , Sum(Nbr_Fixed) , Sum(Nbr_ARMS) , Sum(Nbr_NewConst) , Sum(Amt_Fixed) , Sum(Amt_ARMS) , Sum(Amt_NewConst), Sum(Nbr_Below80) ,Sum(Nbr_80_85) , Sum(Nbr_85_90) , Sum(Nbr_Above90), Official_Name, SMSA_CD FROM LoanMaster GROUP BY StateCD, CountyCD, SaleMnYear, LenderName, MDSID,Official_Name, SMSA_CD') SELECT @ERR = @@ERROR, @ROWS = @@ROWCOUNTEnd |
|