ActiveX Script Running DTS Causes Error
Apr 14, 2005
Hello All,
I have an ActiveX script that runs DTS pachkages. In the event that a package fails I want to display the error message. I found the following code (in bold) for doing this but I keep getting an error message as follows.
Type mismatch 'oSoStep.GetExecutionErrorInfo'
All help appreciated.
Thanks, Gary
View 2 Replies
ADVERTISEMENT
Sep 13, 2006
I have a DTS package that I brought over from SQL server 2000 in to SQL Server 2005. I have installed all of the legacy components to run the DTS packages but I need to debug an ActiveX script task. In SQL Server 2000 I could turn on Just-In-Time debugging and use the stop operator (in my vbscript) to break the running script and launch the debugger.
I don't see how to do this in SQL Server 2005 Management Studio. Is it possible to debug a script object in a DTS package running in SQL Server 2005?
Jay Abbott
View 1 Replies
View Related
Jul 28, 2006
This error occurs when the ActiveX task tries to execute:
[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.
Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.
View 8 Replies
View Related
Apr 28, 2005
Hello,
I have a DTS package that has an ActiveX task. This task works with access to create databases and push out data to them. The problem is, I'm getting an error trying to establish a connection to the SQL Server database as such:
set objConn = Server.CreateObject("ADODB.Connection")
I get this as a resolution:
http://support.microsoft.com/default.aspx?scid=kb;en-us;201740
But I wasn't sure since I'm not dealing with ASP. I'm trying to run the task as myself manually, not scheduled also, for testing purposes. Any ideas?
Thanks.
View 1 Replies
View Related
Oct 17, 2003
I get this error msg when I run my ActiveX script in a DTS package.
Err number: 429
Err Message: ActiveX component can't create object
When I Set crApplication = CreateObject("CrystalRuntime.Application.9")
if Err.Number <>0 then
'I get the message here
ne one know what this is about? I'm running this package on SQL server 2000 with Admistrative access
View 5 Replies
View Related
Oct 6, 2005
I am tying to run this DTS:
the job has an activex part which uses :
"Set fso = CreateObject("Scripting.FileSystemObject")"
this row gives me the following error:
"ActiveX Scripting encountered a Run Time Error during the execution of the script. "
the dts worked when I run it local on my station but when I try running it on the server this error comes
can u help???
10x
View 1 Replies
View Related
Nov 30, 2007
HI Experts,
I am having 2 severs (SQL2000 & SQL2005), there is already one DTS package in SQL 2000, now i have migrated DTS package to SSIS package. Now the problem is DTS package is having ActiveX script and it was executing perfectly in 2000 server but after migrated to 2005 server if i am executing the coverted SSIS package it is giving one error and the error is displaying here.
Error1Validation error. DTSTask_DTSDataPumpTask_1: OLE DB Destination [181]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Microsoft OLE DB Provider for SQL Server Copy" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.SearsCDCC_Transfer (1).dtsx00
and i am also displaying the ACtiveX code as well and here oma11pngrdb02 is 2000 server and sant01pngrdb is 2005 server.
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Dim gsErrorFile
gsErrorFile = "\oma11pngrdb02App_Data_ReportingSearserrors2.txt"
Function Main()
Main = DTSTaskExecResult_Success
set objftp = CreateObject("ftpx.aspftp")
objftp.sServerName = "10.1.3.175"
objftp.sUserID = "COS.FTP"
objftp.sPassword = "SENDFILE"
if objftp.bConnect then
dim fname, lfname
fname = "$IOMH04.PRDFFTAP.ST462330"
lfname = "\oma11pngrdb02App_Data_ReportingSearscdccfile.txt"
If objFTP.bGetFile (fname, lfname ) then
Main = DTSTaskExecResult_Success
Else
logError("Error getting file: " & objFTP.sErrorDesc)
Main = DTSTaskExecResult_Failure
End If
Else
logError("Error connecting: " & objFTP.sErrorDesc)
Main = DTSTaskExecResult_Failure
end if
End Function
Function logError(sErrorMsg)
Dim objErrorFile, objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objErrorFile = objFSO.OpenTextFile(gsErrorFile, 2,True)
objErrorFile.writeLine "Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! "
objErrorFile.writeLine FormatDateTime(Now(),vbShortdate) & " " & FormatDateTime(Now(),vbShorttime)
objErrorFile.writeLine sErrorMsg
objErrorFile.writeLine "Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! "
objErrorFile.close
Set objErrorFile = Nothing
Set objFSO = Nothing
End Function
Can any one give me the solution as early as possible, and your help is soo Appreciable
-Thanks N Regards,
Kanthi.
View 2 Replies
View Related
Oct 26, 2006
My ActiveX code wrote:
Function Main()
msgbox "Hello" & DTSTaskExecResult_Failure & DTSTaskExecResult_Success
Main = DTSTaskExecResult_Failure
End Function
However - it displays "Hello10" - but SSIS will not throw an error - it executes successfully.
Any ideas?
View 5 Replies
View Related
Jan 27, 2006
Hi,
I'm trying to reset the below Global varialbe in SSIS - Activex script.
Function Main()
DTSGlobalVariables("GxvFilename").value =null
Main = DTSTaskExecResult_Success
End Function
Getting the below Error when executing the package.
[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x060339E4
Please provide me solution for this.
Thanks,
View 2 Replies
View Related
Feb 25, 2005
I am using ActiveX Script tasks to branch out on the different tasks that I have within the DTS. When I want a particular branch of tasks not to be executed, I give a "Main = DTSStepScriptResult_DontExecuteTask"
This seems to be working fine in terms of functionality, but there is an error that is displayed saying "Task reported failure on execution".
How do I get rid of this? I need to exit the task, and still just get one message box at the end of it all that happily reads "Succesfully completed tasks"
View 2 Replies
View Related
Nov 30, 2007
HI Experts,
I am having 2 severs (SQL2000 & SQL2005), there is already one DTS package in SQL 2000, now i have migrated DTS package to SSIS package. Now the problem is DTS package is having ActiveX script and it was executing perfectly in 2000 server but after migrated to 2005 server if i am executing the coverted SSIS package it is giving one error and the error is displaying here.
Error 1 Validation error. DTSTask_DTSDataPumpTask_1: OLE DB Destination [181]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Microsoft OLE DB Provider for SQL Server Copy" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. SearsCDCC_Transfer (1).dtsx 0 0
and i am also displaying the ACtiveX code as well and here oma11pngrdb02 is 2000 server and sant01pngrdb is 2005 server.
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Dim gsErrorFile
gsErrorFile = "\oma11pngrdb02App_Data_ReportingSearserrors2.txt"
Function Main()
Main = DTSTaskExecResult_Success
set objftp = CreateObject("ftpx.aspftp")
objftp.sServerName = "10.1.3.175"
objftp.sUserID = "COS.FTP"
objftp.sPassword = "SENDFILE"
if objftp.bConnect then
dim fname, lfname
fname = "$IOMH04.PRDFFTAP.ST462330"
lfname = "\oma11pngrdb02App_Data_ReportingSearscdccfile.txt"
If objFTP.bGetFile (fname, lfname ) then
Main = DTSTaskExecResult_Success
Else
logError("Error getting file: " & objFTP.sErrorDesc)
Main = DTSTaskExecResult_Failure
End If
Else
logError("Error connecting: " & objFTP.sErrorDesc)
Main = DTSTaskExecResult_Failure
end if
End Function
Function logError(sErrorMsg)
Dim objErrorFile, objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objErrorFile = objFSO.OpenTextFile(gsErrorFile, 2,True)
objErrorFile.writeLine "Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! "
objErrorFile.writeLine FormatDateTime(Now(),vbShortdate) & " " & FormatDateTime(Now(),vbShorttime)
objErrorFile.writeLine sErrorMsg
objErrorFile.writeLine "Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! "
objErrorFile.close
Set objErrorFile = Nothing
Set objFSO = Nothing
End Function
Can any one give me the solution as early as possible, and your help is soo Appreciable
View 4 Replies
View Related
Sep 5, 2006
Hi,
I migrated DTS From sql server 2000 to 2005 .
But i have problemes with the ativex :
Error: 0xC0048006 at Loop action, ActiveX Script Task: Retrieving the file name for a component failed with error code 0x000F5544.
In DTS ActiveX scripting it was common to get a reference to the package itself using the following line of code:
Dim package = DTSGlobalVariables.Parent
This was used to navigate over the DTS object model , to loop.
Someone can help me to know haw I can do the same thing with the SSIS.
Regards,
View 3 Replies
View Related
Oct 1, 2007
I am getting an Error on Line 4 of sample code, any idea, where?
if isdate(mid(DTSSource("Col016"), 5, 2) & "/" &
right(DTSSource("Col016"), 2) & "/" & left(DTSSource("Col016"), 4)) then
DTSDestination("DOB") = mid(DTSSource("Col016"), 5, 2) &
"/" & right(DTSSource("Col016"), 2) & "/" & left(DTSSource("Col016"), 4)
else
DTSDestination("DOB") = NULL
end if
View 6 Replies
View Related
Feb 27, 2007
when i run activex Script it's shows this error
[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438
View 2 Replies
View Related
Mar 31, 2008
Hey...
I am running a parent SSIS package (running sp2, 9.0.3042) that calls several child packages.
On our development server, we now cannot run this because we get 1 or more of these errors:
"Error 0x80004003 while preparing to load the package. Invalid pointer . "
"Error 0xC0011008 while preparing to load the package. Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored. . "
It is not occuring on the same packages. It varies every time it is run.
I can run every one of the child packages individually, using the same login ID that the parent is executed under.
The parent package works fine on my local machine and other servers running the same version of SSIS. Just not on this server.
Does anyone have any ideas???
Thanks
BobP
View 17 Replies
View Related
Jul 11, 2006
I am sync. for the first time (Merge Replication using SQL 2005 and Mobile) and this error keeps poping up on the emulator. I am tring out the tutorial. :) boss on my butt.
Does anyone have any ideas or a solution to this...your help is WELL APPRECIATED ...
Error code: -2147024809
zo
View 10 Replies
View Related
Aug 9, 2006
Hi there
I have small problem with the ADO 2.6 - 2.8 Command object.
I created a Stored procedure preforming some tasks within a tran.
whitin the tran i'm collecting the @@ERROR values and in the end (after tran closing )generating the correct error string - which will be send back to the caller
in the VB6 app, i'm using a command object with the next line:
Set MyRecordset= MyCommand.Execute
In all the cases and option, when i run the SP - the command preform the tasks and return closed recordset (with the currect answer) and i can't read it.
the only solution that worked until now: i need to call MyRecordset.Open which will requery the SP again and generate an error (User defined error).
It happens only when i run command.execute with SP that preforms multitasks and return result recordset.
CAN ANY ONE HELP ME
View 1 Replies
View Related
Sep 12, 2007
I'm getting an error when I try to import a flat file package from SQL, when I created it on Visual Studios it runned fine.
I'm getting this error on SQL when I try to run the job:
Executed as user: MAINOFFICEASPNET. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 11:30:01 PM Error: 2007-09-11 23:30:06.56 Code: 0xC001401E Source: Import_GasBoyData Connection manager "RawTrans" Description: The file name "\Mt111gasboyPC TopKATFiles
awtrans.dat" specified in the connection was not valid. End Error Error: 2007-09-11 23:30:06.56 Code: 0xC001401D Source: Import_GasBoyData Description: Connection "RawTrans" failed validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 11:30:01 PM Finished: 11:30:07 PM Elapsed: 6.063 seconds. The package execution failed. The step failed.
Thanks,
Erick
View 2 Replies
View Related
Dec 28, 2006
Hi,
I am trying to run a DTS from SP. The SQL code that I am using is as follows.........
exec master..xp_cmdshell 'dtsrun /S 142.102.27.207 /U sa /P sa /N DTS_TEST1'
But Running this I am getting the the following errror.......
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDataPumpTask_1
DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)
Error string: Error opening datafile: The system cannot find the path specified.
Error source: Microsoft Data Transformation Services Flat File Rowset Provider
Help file: DTSFFile.hlp
Help context: 0
Error Detail Records:
Error: 3 (3); Provider Error: 3 (3)
Error string: Error opening datafile: The system cannot find the path specified.
Error source: Microsoft Data Transformation Services Flat File Rowset Provider
Help file: DTSFFile.hlp
Help context: 0
DTSRun OnFinish: DTSStep_DTSDataPumpTask_1
DTSRun: Package execution complete.
NULL
View 5 Replies
View Related
Apr 29, 2008
I am running job which executes SSIS Package.
Iam getting following message as failure of step.
"Non-SysAdmins have been denied permission to run DTS Execution job steps without a proxy account. The step failed."
Can any one help me in this..
Thanks,
ServerTeam
View 1 Replies
View Related
Nov 5, 2007
I have this SSIS Package that it works when I run it on development on Visual Studio. But when I imported it and schedule the job, it gives me the following error:
Executed as user: MAINOFFICEASPNET. ... 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 2:38:39 PM Error: 2007-11-05 14:38:41.02 Code: 0xC0202009 Source: Export_WHSCANP Connection manager "10.5.1.10.DRDB400.aspnet1" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "IBMDA400 Session" Hresult: 0x80004005 Description: "CWBSY0002 - Password for user ASPNET on server 10.5.1.10 is not correct ". End Error Error: 2007-11-05 14:38:41.04 Code: 0xC020801C Source: Data Flow Task OLE DB Destination [801] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "10.5.1.10.DRDB400.aspnet1" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnec... The package execution fa... The step failed.
This is trying to get a table from the SQL server and copy it to an IBM AS400 server. Any ideas?
Thanks,
Erick
View 3 Replies
View Related
Mar 5, 2004
I downloaded the code example "Running Stored Procedures with ASP.NET" (http://www.dotnetjunkies.com/Tutorial/9AE62C44-3841-4687-B906-2F6D4A5A4622.dcik)
and I'm having trouble filtering the sp's that are populating the drop down box. Here's my code: (all I did was add the one parameter)
Dim ds As New DataSet
Dim conn As New SqlConnection( _
Data source=" & DatabaseServer.Text & _
";User id=" & Userid.text & _
";Password=" & Password.Text & _
";Initial catalog=" & Database.Text)
Dim cmd As New SqlCommand("sp_stored_procedures", conn)
Dim adpt As New SqlDataAdapter(cmd)
Try
cmd.Parameters.Add("@sp_name", SqlDbType.NVarchar, 390).Value = CType("my%", String)
so if I comment out the cmd.Parameters.Add ... line it all works fine and I get every sp, but if I uncomment it I get " Incorrect syntax near 'sp_stored_procedures'" every time no matter what i put in the string.
I have a feeling I'm doing something stupid :) Anyone have any ideas? The query works fine in query analyzer with the same arguments that I'm trying in the code.
View 4 Replies
View Related
May 24, 2000
Hi everybody,
I am getting an error while running the XP_CMDSHELL 'NET USER /DOMAIN'.
But when I run the same command for sp_cmdshell 'net user' it works fine. It giving me the local users that are available on the my local pc. But now i want the domain users on my network which is not working with the xp_cmdshell..
Thanks in advance......
View 1 Replies
View Related
Dec 1, 2006
Hello,
I have a DTS package that will run and execute with no problem when you start it. But when I schedule the dts package. The dynamic properties task fails with the following message.
Executed as user: CSEDBSTST001sqljobmgr. DTSRun: Loading... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSActiveScriptTask_1 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1 DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_1 DTSRun OnError: DTSStep_DTSDynamicPropertiesTask_1, Error = -2147220492 (800403F4) Error string: Could not open file for reading. Error source: Dynamic Properties Task Help file: Help context: 0 Error Detail Records: Error: 0 (0); Provider Error: 0 (0) Error string: Could not open file for reading. Error source: Dynamic Properties Task Help file: Help context: 0 DTSRun OnFinish: DTSStep_DTSDynamicPropertiesTask_1 DTSRun: Package execution complete. Process Exit Code 1. The step failed.
The task reads an .ini file to setup up many properties throughout the DTS package.
Does anyone have an idea about this?
Thanks
View 1 Replies
View Related
May 5, 2008
Hi all,
I m getting the following error while running the bcp utility.
Cannot insert null into column_name in table
something like this.
The value for that column is null in the input .csv file.
Instead of throwing error like this, i need those bad records should go in to the .BAD file and the remaining records should get uploaded into the database.
In my case the entire data upload is failing if any one bad record is there in the .csv file.
Can anybody help me. Its a bit urgent.
Thanks in advance,
Bharanidharan L
View 2 Replies
View Related
Nov 15, 2005
When I run sp_helpdb against the master (or any other DB for that matter) I get the following error:
Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53
Cannot insert the value NULL into column 'owner', table 'tempdb.dbo.#spdbdesc_ 0010001A6EF'; column does not allow nulls. INSERT fails. The statement has been terminated.
I have about 20 DBs on a SQL Server 2000 Standard Edition Instance with sp3a .
There have been no changes made to the Server or the SQL Server Instance in quite some time. Can anyone tell me how I should proceed??????
View 6 Replies
View Related
Mar 2, 2004
Hi,
SQL Server 7
When i ran a query in query analyzer i am getting the below error.
once i closed and opened the query analyzer and ran the same query it worked fine.
pls the error which i got in first time.
Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
Pls help me in this
TIA
Adil
View 5 Replies
View Related
Jul 23, 2005
I am getting the following error when running a command in QueryAnalyzer.Msg 50001, Level 1, State 50001xpsql.cpp: Error 5 from CreateProcess on line 675Here is the command that I am running that generates this errormessage:xp_cmdshell "@ECHO test message > c: empewtemp.txt"The command inside the xp_cmdshell command runs successfully from aWindows command prompt. Simpler commands also fail with the same errormessage. For example:xp_cmdshell 'dir'Can anyone suggest a solution to this problem? I assume this problem isdue to a permissions/security issue. I have given Everyone Full Controlover c: emp.Windows 2000SQL Server 2000Thanks for any help.
View 4 Replies
View Related
Sep 14, 2007
I have a DTS package which deletes some rows in a table and then inserts new ones from a Dbase file.
When I execute the package it works perfectly, but when I shedule it as a job it gives this error message:
Executed as user: LOMMELDOMAdministrator. ...DTSStep_DTSExecuteSQLTask_2 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2 DTSRun OnStart: Copy Data from GRES to [ZNA].[dbo].[GRES] Step DTSRun OnError: Copy Data from GRES to [ZNA].[dbo].[GRES] Step, Error = -2147221164 (80040154) Error string: Class not registered Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 700 Error Detail Records: Error: -2147221164 (80040154); Provider Error: 0 (0) Error string: Class not registered Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 700 Error: -2147221164 (80040154); Provider Error: 0 (0) Error string: Class not registered Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 4700 Error: -2147221164 (... Process Exit Code 5. The step failed.
The deleting of the rows works but the import from the Dbase doens't, I thought it was a security issue. So I made sure the JobAgent has all the rights it needs to access the directory of the Dbase file.
Any clues?
View 8 Replies
View Related
Mar 3, 2008
Hi all
While running "sp_expired_subscription_cleanup"
Executed as user: KartorAdmin. Could not find stored procedure ''. [SQLSTATE 42000] (Error 2812). The step failed.
Please tell where this SP will store in subscriber database or in Subscriber Sytesm System datases
View 1 Replies
View Related
Dec 12, 2007
I have recieved the following error message while running a query on SQL2k5 on a Windows 2003 64-bit EE server
"The operating system returned error 1450(error not found) to SQL Server during a write at offset 0x00001c32062000 "
I will be grateful if anyone can point me in the right direction on what this can be.
Thanks
View 3 Replies
View Related
Apr 11, 2008
HI,
I have a script which creates the tables and loads the data.
While creating the table it gave following error.
Warning: The maximum length of the row exceeds the permissible limit of 8060 bytes. For some combination of large values, the insert/update operation will fail.
While loading the data, it gave the error as follows:
Insufficient memory to load the data.
Could you please suggest how to over come this problem.
Thanks in Advance.
View 3 Replies
View Related
Feb 25, 2007
Hi, I am having problems running my import query. It runs to a point, then the next block of SQL it fails on, does anyone know why this is? I have included the code and the error message underneath. The import is ran using SQLwebadminThanks
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [HOME_RECORDS]
AS
SELECT dbo.TEAMS.TEAM_ID, ISNULL(dbo.HW.COUNT_HOME_WINS, 0) AS W, ISNULL(dbo.HD.COUNT_HOME_DRAWS, 0) AS D,
ISNULL(dbo.HL.COUNT_HOME_LOSES, 0) AS L, ISNULL(dbo.HW.HGF, 0) +
ISNULL(dbo.HD.HGF, 0) + ISNULL(dbo.HL.HGF, 0) AS F,
ISNULL(dbo.HW.HGA, 0) + ISNULL(dbo.HD.HGA, 0) + ISNULL(dbo.HL.HGA, 0) AS A
FROM dbo.TEAMS LEFT OUTER JOIN
dbo.HW ON dbo.TEAMS.TEAM_ID = dbo.HW.F_HOME_TEAM LEFT OUTER JOIN
dbo.HD ON dbo.TEAMS.TEAM_ID = dbo.HD.F_HOME_TEAM LEFT OUTER JOIN
dbo.HL ON dbo.TEAMS.TEAM_ID = dbo.HL.F_HOME_TEAM
The following error occured while executing the query:
Server: Msg 208, Level 16, State 1, Line 3
Invalid object name 'dbo.HW'.
View 2 Replies
View Related