Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Posts
    4

    Unanswered: run sql script at a specific time

    I have an sql statement that I can run by hand. How do I get a job to run this automatically.

    I have tried to create a job and it just failes out every time...

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You need to give more information. What does your job do. What job steps are executed. What error messages are generated....
    Start by setting the job to log messages to a file for review.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Oct 2005
    Posts
    4
    Sorry for the late response here is my sql statement:

    use intranet;
    INSERT INTO USER_INFO (fpu_id,FIRSTNAME, LASTNAME, BOXNUMBER) SELECT id,first,last,box FROM stmailbox WHERE id NOT IN (SELECT FPU_ID FROM USER_INFO);

    And when I go through the DTS screens. Telling DTS to copy data from a 3 column temp database to a permanent database called USER_INFO I get a warning that says "LINE 3 incorrect syntax near ')'" This is for the create table steps.....

    Under the next line I get, Invalid Opject named results....

    I am new to DTS,

    Any help would be good

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You are still not making any sense.
    In your first post you say you have a job that is failing. In your second post you are talking about a DTS package.
    You list some SQL code, but not how this has anything to do with your DTS package. Your error "LINE 3 incorrect syntax near ')'" doesn't even make sense given that your code only has two lines. I don't even know whether your error is referring to your SQL statement or code within your DTS package.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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