Previous Next

Thread: SQL table does not exist. Help

Last post 05-12-2008 2:24 PM by yanaho. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 05-12-2008, 10:05 AM

    • yanaho
    • Not Ranked
    • Joined on 05-08-2008, 6:39 PM
    • Posts 6
    • yanaho

    SQL table does not exist. Help

    I have an existing table made for this select into statement. 

    LogParser "SELECT DISTINCT MSGID, Event-ID, Time, Recipient-Address, Sender-Address, Message-Subject INTO Emails FROM test.log WHERE Event-ID = '1028' OR Event-ID = '1020'" -i:W3c -separator:tab -o:sql -oConnString:"Driver={SQL Server};Server=intranet;db=sthunt;uid=sa;pwd=password" -ignoreIdCols:ON -createTable:OFF

     When run it comes back with  

     Error while executing ODBC SELECT query
      SQL State:     42S02
      Native Error:  208
      Error Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid
      object name 'Emails'.
      The specified table "Emails" does not exist

    When I change the createtable switch to on, it creates the table Emails under the Master db.  The database sthunt does exist and so does the table emails.  Can anyone help?

     

     

  • 05-12-2008, 2:08 PM In reply to

    Re: SQL table does not exist. Help

    Use standard SQL notation to make sure you're working in the right database and table.  As in:

    "SELECT..... INTO sthunt.Emails FROM..."

    As long as the Emails table exists in the sthunt database as you say, this should find it.  By default it's looking in Master.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 05-12-2008, 2:24 PM In reply to

    • yanaho
    • Not Ranked
    • Joined on 05-08-2008, 6:39 PM
    • Posts 6
    • yanaho

    Re: SQL table does not exist. Help

    Thanks for the reply, I ended up using the -switches instead of -oconnectionstring

    which seems to be working.

Page 1 of 1 (3 items)
Page view counter