locked
70-448 Chapter 3 Lesson 1 Exercise 3 Error RRS feed

  • Question

  • Hi,

    I'm getting the following error on step 9:  "Error:  Executing the query "delete from stg_Customer where FileName = ?" failed with the following error:  "invalid object name 'stg_Customer'.

    Has anyone seen this error before?

     

    Shawn

     

    Thursday, April 22, 2010 8:52 PM

Answers

  • I got this code from one of the solution file after clicking on NEW from the OLE DB Destination task

    CREATE TABLE [stg_Customer] (
        [City] nvarchar(255),
        [FirstName] nvarchar(255),
        [LastName] nvarchar(255),
        [Address 1] nvarchar(255),
        [Phone] nvarchar(255),
        [Age] nvarchar(255),
        [State] nvarchar(255),
        [New_Age] numeric(18,0),
        [FileName] nvarchar(255),
        [LoadDatetime] datetime,
        [FullName] nvarchar(511)
    )

    Created it in AdventureWorks2008 and package seems to be working.

    • Proposed as answer by l2awin Tuesday, February 22, 2011 2:53 AM
    • Marked as answer by Mr. Wharty Wednesday, June 6, 2012 12:57 PM
    Tuesday, February 22, 2011 2:52 AM

All replies

  • Yeah, I ran into it while going through that exercise too. For some reason they have an example that references a table that doesn't exist. I'm not sure if they intended to have the reader create the table and missed it, but I created the table myself so that it can compile. It's not the best table definition in the world, but it causes the task to compile without error. Of course, the source data has non-numeric ages, which will cause the Data Flow task to fail, but maybe that's covered in another chapter.

    USE [AdventureWorks2008]
    GO
    CREATE TABLE [dbo].[stg_Customer](
        [FirstName] [nvarchar](255) NULL,
        [LastName] [nvarchar](255) NULL,
        [FullName] [nvarchar](511) NULL,
        [Address1] [nvarchar](255) NULL,
        [City] [nvarchar](255) NULL,
        [State] [nvarchar](255) NULL,
        [Age] [numeric](18, 0) NULL,
        [FileName] [nvarchar](255) NULL,
        [LoadDatetime] [datetime] NULL
    ) ON [PRIMARY]
    GO

    Thursday, May 13, 2010 5:42 PM
  • I got this code from one of the solution file after clicking on NEW from the OLE DB Destination task

    CREATE TABLE [stg_Customer] (
        [City] nvarchar(255),
        [FirstName] nvarchar(255),
        [LastName] nvarchar(255),
        [Address 1] nvarchar(255),
        [Phone] nvarchar(255),
        [Age] nvarchar(255),
        [State] nvarchar(255),
        [New_Age] numeric(18,0),
        [FileName] nvarchar(255),
        [LoadDatetime] datetime,
        [FullName] nvarchar(511)
    )

    Created it in AdventureWorks2008 and package seems to be working.

    • Proposed as answer by l2awin Tuesday, February 22, 2011 2:53 AM
    • Marked as answer by Mr. Wharty Wednesday, June 6, 2012 12:57 PM
    Tuesday, February 22, 2011 2:52 AM