Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post
    I have the following SQL statement that works fine in the MS SQL Server Enterprise Query Analyzer but when I put it in as part of a DTS package it errors out stating csLiveUsers is an invalid object name

    update users
    set dtlastlogindate = LiveUsr.dtlastlogindate
    from users usr inner join csLiveUsers LiveUsr
    on usr.chuserid=LiveUsr.chuserid

    I have tried placing dbo. as a prefix to the table names assuming it was an access issue but to no avail. Any ideas?
    Jerry

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Does it help if you remove the table aliases?

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='HansV' post='785916' date='23-Jul-2009 14:51']Does it help if you remove the table aliases?[/quote]

    No, sadly not but I have just solved it, it was not the SQL code at all but the connection setting..GGGRRRRRRR

    I am connecting to a live server getting data from the Live Users table and connecting to my Dev database and updating logindates. I created a custom table called csLiveUsers in the Dev database. When I created the next transformation I inadverantly had it still connected to the live box and of course if doesn't have that table in its schema. I just redirected the connection to the Dev database and it worked a dream.......

    Thanks for the idea, that was one of my thoughts and even prefixing it with dbo.
    Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •