'Invalid Pointer' in DTS Package

  • I am running SQL 2K and have just created a DTS package which retrieves employee details from ActiveDirectory into a Staging database table and then loads a Main database table. I am getting 'Invalid Pointer' on the last step - detailed below. The T-sql works properly in Query Analyser and parses in DTS.

    UPDATE ADSEmployee SET CountryID=(SELECT CountryID FROM MAIN.dbo.tblCountry WHERE Country='GB') WHERE adspath LIKE '%OU=UK%'

    UPDATE ADSEmployee SET CountryID=(SELECT CountryID FROM MAIN.dbo.tblCountry WHERE Country='GB') WHERE adspath LIKE '%OU=Wantage%'

    UPDATE ADSEmployee SET CountryID=(SELECT CountryID FROM MAIN.dbo.tblCountry WHERE Country='GR') WHERE adspath LIKE '%OU=Greece%'

    UPDATE ADSEmployee SET CountryID=(SELECT CountryID FROM MAIN.dbo.tblCountry WHERE Country='IT') WHERE adspath LIKE '%OU=Italy%'

    UPDATE ADSEmployee SET CountryID=(SELECT CountryID FROM MAIN.dbo.tblCountry WHERE Country='DE') WHERE adspath LIKE '%OU=Germany%'

    UPDATE ADSEmployee SET CountryID=(SELECT CountryID FROM MAIN.dbo.tblCountry WHERE Country='FR') WHERE adspath LIKE '%OU=France%'

    UPDATE ADSEmployee SET CountryID=(SELECT CountryID FROM MAIN.dbo.tblCountry WHERE Country='US') WHERE adspath LIKE '%OU=Alsip%'

    UPDATE ADSEmployee SET CountryID=(SELECT CountryID FROM MAIN.dbo.tblCountry WHERE Country='US') WHERE adspath LIKE '%OU=Americas%'

    UPDATE ADSEmployee SET CountryID=(SELECT CountryID FROM MAIN.dbo.tblCountry WHERE Country='**') WHERE CountryID IS NULL

    UPDATE ADSEmployee SET UserClass=1 WHERE UserAccountControl <600

    UPDATE ADSEmployee SET UserClass=2 WHERE UserAccountControl >=600

    INSERT

    MAIN.dbo.tblEmployee

    (FName, LName,

    NTLogon, ITComment, EmployeeClassID, CountryID, LastUpdatedBy, DateTimeLastUpdated)

    SELECT

    FName, LName, Login, Comments, UserClass, CountryID,'ActiveDirectory Dataload',getdate()

    FROM Staging.dbo.ADSEmployee

    WHERE Login NOT IN

    (SELECT NTLogon FROM MAIN.dbo.tblEmployee)

    Can anyone advise what is causing this problem.

  • This was removed by the editor as SPAM

  • Are there any weird characters in the data you are inserting, like quotes and such?

    Thanks

    Phill Carter

    --------------------
    Colt 45 - the original point and click interface

  • There are no odd characters.

    I have tried manipulating the package and by splitting the update and inserts into 2 sql tasks I have managed to get it to work without reporting errors.

  • add

    SET NOCOUNT ON

    SET ANSI_WARNINGS OFF

    to the beginning of your proc / script

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply